How to put variables from actors that are in the level into UI?

From what I know you use GameMode or GameInstance to pass the variables but I have a problem here, the value from GameInstance doesn’t show on UI, if I unbind it then it shows whatever text I put on the editor

HUD

Widget Function, nothing on the Event Graph

The GameInstance Graph is empty, it only have 1 public variable in it.

I test the GameInstance by setting some actor to self destruct when the variable inside GameInstance reached certain number, and when it did the actor destroy itself, so I think the problem is within the widget.

Hi Naranaraya

Did you set properly your GameInstance class inside your Project settings? I made your same setup and for me is working!

Yes it set to my custom GameInstance.

This time I imitate the blueprint for my player health UI that is working, and it still doesn’t show anything. The Print String do show the correct value though.

I end up creating a new Widget and use that instead, and for some reason it works even though I put the same thing as the old one.