If there are multiple node type handlers that are interleaved in the Hierarchy, and you move some nodes to modify the interleaving ordering in the main stage, undoing this operation in a stage other than the main stage will not restore the correct interleaving ordering.
This can also happen if the drop operation to move nodes open a prefab stage (like moving prefab children) and you go back to the main stage. Undo will undo the underlying data's modifications but not restore the interleaved ordering.
The issue is that we only have a single hierarchy instance, so any undo/redo is dropped if the hierarchy instance does not match what is stored in undo payload.
Steps to reproduce:
- Open any project and any scene.
- In the Hierarchy, add any visual element so you have a UXML game object with its underlying UXML document as a child.
- Add a game object above the child UXML document, and one below.
- Move the game object that is below the child UXML above the first one.
- Enter a prefab stage.
- Undo the move (you might need to to multiple undo to actually undo the move, look at the undo history for the "sibling order change").
- Go back to the main stage.
Actual results: Interleaved ordering is not restored (moved game object is above the UXML document).
Expected results: Interleaved ordering is restored (moved game object is below the UXML document).
Reproducible with versions: 6000.7.0a5, 6000.6.0b7
Not reproducible with versions:
Can’t test with versions:
Tested on (OS): Windows 11
Notes: