How to get a variable value from a c++ class to display as an UMG text block

So a few days ago I started making a user interface for my school project. I cannot seem to get a variable value to display in a text block. In the binding I look for all the actors that use UserInterfaceManager. In my current scene, this is only one actor. I then try to return a float using the GetCurrentSpeed method. My widget and c++ code both compile, but my text is always set to 0.0, when it should be 5. Even when I hardset Speed to any other number, it always displays 0.0. Any idea what I’m doing wrong here?

1 Like

You need to connect GetText0 block to the GetAllActorsOfClass block.

1 Like

Wow you’re a legend. Don’t know why I didn’t try that. You helped me big time. I connected GetText0 to GetAllActors and connected GetCurrentSpeed to the return node. It now works!

1 Like