Hello. I created a widget and added it to viewport but sometime when I’m going through my levels I’m getting an error “Blueprint Runtime Error: “Accessed None trying to read property CallFunc_Create_ReturnValue”. Node: Add to Viewport Graph: EventGraph Function: Execute Ubergraph BP Top Down Character Blueprint: BP_TopDownCharacter”. I can’t even know where is problem, because I see widget every time (so it exist). I suppose ue is trying to get widget when it’s not existing, but even with additional logic the error is appearing sometime.
Here’s my BP of Top Down Character:
I would personally keep the UI in a blueprint derived from the HUD class & set this specific hud in the game mode.
Then if needed you can always access it through GetPlayerController => get HUD (cast to your hud bp) and then the specific widget variable (promote to variable after creating the widget)