ah, nice, another bug, that is known for multiple years, but still not fixed.
4.27, still a thing. Love loosing hours of work!
Seeing this is still an issue. (tested 4.27.2)
There are multiple things that can go wrong, but here are a few from my documentation:
If you encounter warnings that widgets have been removed from a UserWidget, there are two common scenarios which can quickly lead to data loss.
*1: You have moved an asset and are looking at a cache problem. How to deal with this:
The "Failed to load outer for..." is common with widgets and can delete the contents of entire UserWidgets if you continue to use them. Stop working, close the editor and clear the following cache folders:
--\AppData\Local\UnrealEngine\Common\DerivedDataCache\
--\AppData\Local\UnrealEngine\Version\DerivedDataCache\
--\Project\DerivedDataCache\
The next time you restart the project it will take some time to start, but this error should be gone.
*2: Your blueprint is corrupted. In all modern engine versions there is a bug which can occur when you restore a deleted widget in the widget tree with an undo (ctrl-z) action, which somehow causes blueprint corruption and will not directly show symptoms.
*3: Adding a UWidget to a WidgetTree after constructing it with an outer which is not in the same widget tree, for example, the UserWidget outer of the WidgetTree. Doing so will cause name conflicts with the constructed widgets and widgets in the existing tree.
That’s the love / hate thing with UE. It’s brilliant but flawed because old systems are not patched. In the end this only increases maintenance costs and research time for all of us.
It’s still a thing in 4.27.2
Lost hours of work
Quite interesting to see Unreal deleting a whole bunch of widgets, and then complaining about them not being there in all the places they’re referenced. Not in a good way, but still ‘interesting’.
I think I triggered mine when I deleted the canvas at the root, and then changed my mind about it. I guess something didn’t quite save correctly after that.
To work around it I told git to replace it with an old version of the widget and copied its parts out manually, switching back to the latest version and pasting in the old widgets. This would’ve been easier to work around if the diff tool could actually show the hierarchy. This work around also only worked because the latest commit was just about code changes (as far as I could tell, but clearly it also broke something behind the scenes).
There is an ancient bug with CTRL+Z to undo deletion of a widget that causes future corruption silently. Thought it had been patched… it’s quite serious having to tell all your designers never to ctrl Z
5.3 and noticing this now, not sure if its my custom widget class or something to do with UE itself.
My widgets got corrupted simply because I referenced them in random blueprint and after engine restart they got kicked out from existing