Invalid UserWidgetObject on BeginPlay

ndelchen
Tue, 14 Jan 2020 10:44:57 +0000
Blueprint

I have two blueprints BP_Elevator and BP_Player. BP_Player has a WidgetComponent attached.

On the elevator’s BeginPlay I get a reference to the player and therefore can get access to the player’s WidgetComponent. However, when trying to access the component’s widget itself using GetUserWidgetObject, I do not receive a valid reference.

When I use a delay of 2 seconds before accessing it, I do receive a valid reference.

Is this behaviour correct? I thought components were initialized before BeginPlay is executed. Since this is a problem that occurred after updating the project to 4.23, I am not sure if this behaviour is normal or if the project somehow got corrupted or something.

7 posts - 1 participant