Quick question, how would I dynamically change text on a umg widget to check if the player is standing, prone etc, I gather I would use Boolean a to check the current position, but how to change the text in umg
You can create a text variable in the widget and bind it to the text block. And then using widget reference, update that variable.
Alternatively, you can expose the text block itself as a variable and update it manually.
i have tried that, i cant seem to edit text outside of the widget, and cant edit it in the widget blueprint
It would be easier to advise if you described what is not working and how you’re trying to do it. Or best, upload an image. Generally speaking, updating the widget directly looks like this:
Get the reference to the widget, get the reference to the exposed text block, set its text.
[…] and cant edit it in the widget
This is one is a bit puzzling. You cannot edit text blocks in the widget designer?
Also, maybe you missed that feature but once you’ve selected a widget, you have the option to expose it as variable. It’s at the very top of the details panel, a checkbox that reads isVariable. Ticking it will allow you to obtain the reference to that particular widget and update it during run time.
i can edit in the widget designer, but not the widget blueprint panel, even after declaring it as a variable
I do not understand what you’re trying to achieve.
According to the topic, you want to dynamically update some text in the widget; the first screenshot I posted demonstrates exactly that. Which part of it is not working for you?
but not the widget blueprint panel
Could you show what you are trying to edit?
will do when i have access to the files