UWidgetComponent::GetUserWidgetObject() returns 0
I have Actor with UActorComponent and UWidgetComponent.
In BeginPlay() within my ActorComponent I want to get UUserWidget which I setted in UWidgetComponent:
w is non zero and w-GetUserWidgetObject() is 0. It works fine in 4.19. Widget is setted, I can see him in editor.
I haven't tested this, but why not give UWidgetComponent::InitWidget() a try?
I looked at the engine code for that function, and it basically just calls
So, try doing...
...and see if that works?
Follow this question
Once you sign in you will be able to subscribe for any updates here