~~
5. Be amazed how it can randomly completely forget the value set from the editor panel on Panel and revert back to the placeholder text set on Button.
Workaround: Hit reload on all affected widgets and panels, save them and push everything back to version control. What is all this weirdness??
I found this in UE4.25 and it’s still there on new projects, someone must have an explanation . I mean I haven’t ran into something like “Placeholder” yet in the bigger games (OK except in LIS before the storm which had missing strings) but eh that is a different issue. I just want to get to work… By now I’m an engine bug hunter and it surely isn’t what I had in mind.
Bump, any fix for this? Incredibly annoying behavior, happens very often. The workaround is reloading the affected asset. Known bug? I can’t risk this happening after packaging
This actually happens every startup now. There’s nothing in c++ or blueprint code which affects this, as noted it is loaded properly after reloading the asset, but I got to do that every single time i load up the editor. How can this happen it’s 2023. One way it apparently gets less is when you reload and resave every single affected widget at once. After that you can restart the engine and enjoy it while it lasts…
That header is a blueprint directly inheriting from UserWidget, no logic in it but to set the text of a text widget to the value of a text property on PreConstruct.
Strangely, this issue occurs either in the editor or in-game (or both) and seems to be related to the state of the parent widget somehow. What I mean by that is that when the header all of sudden starts to misbehave nested on one menu, it can still show up fine if that menu is nested on another UserWidget.
The trigger for the issue seems entirely random and temeporarily goes away if you hit “reload asset” on as many related UserWidgets as possible.
Out of curiosity where are you setting the placeholder text?
I’ve noticed it seems to play nice it you leave the textblocks default text empty and only set the default value on the string that passes in text to the button on pre-construct.
Sadly no . I tested it just now, specifically cleared the textblocks default text, saved, then reconnected the PreConstruct method which sets the text from a text property. The text property holds the placeholder value. I restart the game and it simply says “Placeholder”. Then I reload the button asset and it gets the correct value. The correct value is set by a parent UserWidget which holds a list of buttons, there for each button the text property is set to a localized value on the editor panel. Crazy right? It’s not even everywhere it’s just random if it happens on a certain UserWidget both game and editor. Once it happens it stays.
It’s not some weird hidden logic this happens on 100% blueprint widgets directly inheriting from UUserWidget
Nah, like any panel. Be it a vertical / horizontal box, an overlay, etc. I just display pre styled UserWidgets containing a text block and maybe a background, nothing fancy. The buttons and header shown above are an example of those pre styled assets. All set the text the same way and all have the same bug. I suspect the localization system itself at this point, or the Widget refuses to read the value set by its parent through that public text property.
I just had some similar issue where I thought Set Text wasn’t working.
Turned out my List View which has objects that ref its parent had a stale parent.
Since I destroy and recreate their parent in my case I had to refresh their parent to restore the history of data I used the list for.
I do not believe I got any errors or warnings about the stale parent, it was there just new and the object had an old pointer but again no errors so it seemed strange but makes sense once caught.