[UMG] How to set a text widget dynamically in widget graph?

Hello.
Is it possible to edit a Text widget with a specific variable (string) in widget graph (for example clicking a button)?
Can you tell me how?
Thank

2 Likes

You can do that in two different ways.

  1. bind
  • create a string variable in your widget
  • in your design view, click the text widget, and click the bind button next to the text
  • pick the string variable
  • use button clicks to change the contents of the string variable
  1. set text
  • in your design view, click your text widget, enable the checkbox that sets as variable right by the name
  • in your event graph, make your button onClick events to SetText on your text widget to whatever you want
6 Likes

It works! Thank you very much!

For me is really tricky.

This is my code

And this is the result after picking two collectibles
image

Even I put the 0 on the defautl text or add it via on Event Construct

Really Annoying :confused: