I was rebuilding my old HUD system with the new UMG (from scratch) where I used the “User Created” widget with a variable to handle the player health and relevant info.
The setup is like this:
I have one widget blueprint with the text, bars variables and functions, there’s one variable inside of this widget which defines the player that the information will be retrieved:
Then I use this widget as an user created asset on the main HUD, to show the info for the extra players defined by the game mode, if they are valid, which works just fine:
Is this method intended to be used or should I keep it to only one widget and avoid using “User Created” widgets? This method would save me a lot of time as i would like to use it dynamically.
Thank you, please let me know if you need any other information to solve this issue.
I was unable to reproduce this issue on my end. However, I was able to find a couple of known issues similar to yours with this specific feature in UMG. I have a few questions for you. These will help narrow down what issue you may be experiencing.
Does this occur in a clean project?
Could you provide a picture of your designer tab?
Does the user created widget have any animations in it?
I tried to reproduce on a clean project and it really didn’t reproduced.
After that, I came back to my project and made a few changes on the main HUD BP, when i tried to save it I got a prompt saying that it was impossible to save as it had some data pending (Transient).
As it wasn’t saving, I went to the file location on the explorer and deleted it, opened the UE editor again and created the same BP from scratch, this time it worked without any issue.
So I think it had something to do with the BP not saving correctly and being unable to store the data.
The designer tab now looks like this: (Attached)
There wasn’t any animation on the widget, I’m also attaching the clean project if this could help you in any way. (Attached)
Thank you for your time, you made me find the answer for my issue
I’m currently using the 4.7 version, but a lot of the code changed, the definitive solution for this kind of issue is to create the widget during runtime and add it to a parent (an overlay, size box or whatever suits for your needs).