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
- Tile Palette selected dropdown text does not update when palette is renamed
- ArgumentException thrown and reference to Template gets unset when opening UXML file after editing referenced Template in Play mode
- [iOS][WebGL] Player freezes when multiple properties of a VisualElement are changed at the same time
- Warning 'GetControlID at event ValidateCommand returns a controlID different from the one in the Layout event' is logged when undoing the deletion of an Edited Freeform 2D Light
- ShadowCaster2D breaks on certain Rotation positions when Casting Source is set to PolygonCollider2D
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.