print a variable in the widget

Hi all…
As from title there is a way that i can print on screen the valor of a variable in the widget?
Or i have to do different widget with different value of the variable?

Hi,

I’d make a text in the widget and on blueprints I would bind that text to the variable’s value so it can be visible on screen.

to bind? what you mean with bind?

Take a look at the right of your screen while you have selected the text on your left panel(you’re supposed to have it dragged into the canvas panel). There should be sth called “bind” and if you click on it, you can click on “Create binding”. I am not on home pc now to give you a pic, but it shouldn’t be hard to find it.

You haven’t done bindings again in UMG? It’s the same as when you bind the health progress bar with the health variable value.

never xD

this is the tutoial to read right?

Haha, that’s the tutorial. If you haven’t found the bind, take a picture of your widget with text selected and I’ll paint it for you to see. Then go for example to third person character blueprint (or whatever bluprint you have set the text variable) and make a new variable, make it of type text. Put whatever you want in there. Now open up your widget, press “Create binding” on your text.(for our example we use 3rd person blueprint) This will open up a blueprint for you, there get the character reference(create the reference in your event graph of the widget) and from the character reference get the text variable. Now take the text variable and connect it in the return node and that’s it! Your text will be altered to whatever your variable has!

thanks ;D i solved :smiley: