Hello,
When HUD calls the BeginPlay method for a customized AuthenticationUserWidget by inheriting the UserWidget class in C++, after creating a widget through CreateWidget (GetWorld(), AuthenticationSubclass);.
I think something went wrong during the test of simply printing the widget on the screen through the AddToViewport() method.
Obviously at the time of debug, all components do not return nullptr and the editor starts with good reference, but the widget is not visible on the screen at all.
It was originally intended to add a ScaleBox component underneath the Canvas Panel on the viewport screen, add another Border underneath the component, and change the background color to white to see if the actual widget is displayed on the screen.
But I can’t even solve this process, so I put a question here.
Of course, I also looked for ways to do it using pure C++, or Slate module, but it seems a little complicated, and after inheriting AuthenticationUserWidget with WidgetBlueprint, UPROPERTY (Meta=…)… ) After binding each other with keywords, secondarily to check if they are implemented well.
I tried to check on the editor to see if the actual bAutoize changed to true by referring to Canvas Panel Slot, but this was also not reflected.
I don’t think I can figure out where the problem came from.
The following are the processes that take place.
-
Object Initializer () All classes
-
HUD
->BeginPlay()
->CreateWidget()
->AddToViewPort()
3 AuthenticationUserWidget
->NativeConstruct()
We move on to this stage.
I will attach the details as the picture below.
I’d really appreciate your help
[Structure]
I’m sorry, the Unreal Forum says that new users can only upload 1 image. It’s cumbersome, but I share it as a compressed file and upload it.