Communication between my Health/Mana/ Stamina and HUD

I am trying to communicate my stats of my character to my UI elements. However whenever I test it will not communicate it to my UI. After I exit it says It cant find my elements in my HUD. I cant figure out were I went wrong in my code. I added a video of my code to help with a visual if anyone can help me out. I’ve spent a few hours trying to figure it out, but am stumped.


Hey @TheDittoMaster!

So the main thing I’m not seeing here is:
That error is a Null Reference Exception. Meaning it’s saying "Hey I’m going to get this Root Widget Object here and do this stuff… But there’s no Root Object in this Root-Object-Shaped hole!

Can you show where you are setting your “Root Widget” (The Blue Object Reference W Root) using the “SPAWNED Root Widget for This Instance of the Game”?

Hey @Mind-Brain, thanks for replying. Are any of these photos the part you are looking for?




Currently FWidgetSetup() is called before HUD->BeginPlay() is called and your widgets are not yet created. This way you miss all your initial setup. Make sure that FWidgetSetup() is called after the HUD is created. Put a delay for a start, see if it fixes anything and later fix your dependencies. (if so)

Also, can you try to add the owner here. It shouldn’t matter but it bugs me.

1 Like