Steps to reproduce:
- Open a Unity project
- Open the UI Builder via Window > UI Toolkit > UI Builder
- (optional) Press ctrl + u to bring up the Undo History to make bug easier to see
- Add a Label by dragging it from the Library to the Hierarchy
- Right click on the label and press 'Rename'
- Name the label whatever you like
- Press Ctrl + Z to undo
Actual results: The label is removed from the Hierarchy. As renaming the label via the Hierarchy did not add to the Undo History, it will undo the action before, which was adding the label to the Hierarchy.
Expected results: The renaming is undone and the label is not removed.
Reproducible with versions: 6000.0.12f1, 2022.3.39f1, 2021.3.40f1
Not reproducible with versions: -
Can’t test with versions: -
Tested on (OS): Windows 10. Windows 11
Notes:
- Renaming a control via the Inspector does not cause this bug and will add to the Undo History as expected. It is specifically when renaming via the Hierarchy.