I use a 3D widget that the player can interact within the game world. For this purpose, the buttons are dynamically created in the widget which are needed in each case.
Changing the text by “set text” when it is clicked does not work.
How can I change the button text from e.g. Open - closed?
It seems the only way is to destroy the button and create a new one with the changed text in its place, but it can’t be the right way.
Is there a better way ingame to change the dynamic buttons in the game without using the above described method?
You can bind the “text” to a variable, changing that variable of the blueprint will change the shown text,
So
I have my widget with only an image a button and some variable and some events, this is My_Btn_widget
inside another widget in “User created widget” you can add your own creation.
I am pretty sure you can create it via blueprint too.
So basically inside my master widget i have an array of My_Btn… every one have a text, and a varable binded to the text, Changing it i change the text of any button.