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
- Mouse inputs cannot be inputted when searching the Shortcuts Menu by type "Shortcut"
- "Debug Assertion Failed!" error when launching Windows Dedicated Server Player with Script Debugging enabled
- [Cinematic Studio][3D HDRP] Shader warnings thrown in the Console window when creating a new project with Cinematic Studio template
- Autoplay is triggered on Audio Assets when changing Asset Bundle tags
- Inspector Asset Bundle section has no indication for Variants, AssetBundle is written without a space, and Variant dropdown menu is available without setting the Asset Bundle first
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.