Search Issue Tracker
Fixed in 2022.1.X
Duplicate in 2021.3.X
Votes
0
Found in
2021.2
2021.2.0b4
Issue ID
1357086
Regression
No
Changes in UI Builder are lost when editing a 2D sprite
How to reproduce
- Make a change in the UI Builder (such as changing text size/colour)
- Click on a 2d sprite and click on the sprite editor button in the inspector
- Make a change to the 2d sprite and click close
Actual result
*You are now presented with a dialog box stating that you will lose any unsaved changes in UI Builder.
Expected result
Either changes are not lost or on opening the sprite editor the user is warned about the potential for data loss and is allowed to save any unsaved work.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on GUIManager::DoGUIEvent when focusing on the Game view window on a specific project
- Asset creation in the Project Browser is not always undone/inconsistent when the undo shortcut is pressed right after creating an asset
- JobTempAlloc memory leak warning is thrown when the Player is shut down
- Graphics State Collection warm-up does not work when using with Addressables Shaders
- "Baked Shadow Radius" field is visible but inactive when when the Shadow Type is set to "Hard Shadows" under the Light Component
Resolution Note (fix version 2022.1):
This behavior is unfortunately as designed. The UI Builder relies on the AssetDatabase to react to external changes on any of the assets in use -- including dependents. One the assets that the current UI document (aka uxml) depends on, let's say a sprite, has been modified externally (because the Sprite Editor is external in this use case), and so the uxml was automatically reimported by the editor -- and it is then, and only then, that the Builder is made aware of the external change. The changes that were made locally are then automatically lost and the Builder can only warn the user that this happened.
This way of working with assets (using the AssetDatabase) allows the user to see any changes made in the Builder directly in the Game View (live editing) but has the disadvantage of putting the Builder in the "back seat" and has no control over incoming changes from an external source.
The one thing we could do is update the message that is being sent to the user -- make it a bit gentler -- but other than that I am afraid there is nothing more we can do.