Search Issue Tracker

Fixed

Votes

0

Found in

2022.3.56f1

6000.0.35f1

6000.1.0b2

Issue ID

UUM-92945

Regression

No

Forced to lose unsaved UI Builder changes if edit was made in .uss file

-

Steps to reproduce:

  1. Create a new URP project.
  2. Assets > Create > UI Toolkit > UI Document.
  3. Open this in UI Builder. Under StyleSheets, press + > Create new USS.
  4. Add multiple things to the Hierarchy, make changes, but don't save.
  5. User thought: "Oh, I'd like to create a variable to use with my UI. Let's open (the USS made in Step 3) and add one."

* Open the USS in an IDE/text editor and add:

{code:java}
:root {
--color-1: blue;
--color-2: yellow;
}{code}
To the USS file you created in Step 3. Save your file.

6. User thought:* "Let's put this variable into the UI Builder"
*
* Return to the editor.

 

Actual results:* A warning pops up that the .uxml was changed outside of the UI Builder with the following description.
{code:java}
The UI Builder will now apply the changes made outside of the UI Builder. This overwrites any unsaved changes you made in the UI Builder.
Note: To avoid conflicting changes, make sure to save any changes you make in the UI Builder before editing a file in an external editor or in a dedicated editor inside Unity (this includes resource files like Font and Sprite assets which have their own editor).
{code}

  • (!) The user can only press OK, or X, +both of which lead to all unsaved changes being wiped away.+

 

Expected results:

As the user, I only wanted to add a USS variable, or edit the USS variable to slightly tweak the UI. If this had to happen, I would have much rathered:

  • An option to save UI Builder changes first.
  • An option to undo my USS change, which when discovering this issue was just me editing a value from 36px -> 28px. This would have been a much less painful loss of data.
  • A choice on which to keep.

Being told there is no option but to lose the UXML changes while those changes are still visible in the background was quite sad.

Reproducible with versions:

  • 6000.1.0b2, 6000.0.35f1, 2022.3.56f1, 2022.2.0a17

Tested on (OS): Windows 10

Notes:

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.