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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
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.