Search Issue Tracker

By Design

Votes

0

Found in

2018.3.0a8

2018.3.0b7

2019.1.0a1

Issue ID

1094962

Regression

Yes

The order called by Undo.undoRedoPerformed in CustomEditor has changed

Scene Management

-

How to reproduce:
1. Open attached project "Call order change in Undo.zip" and scene "scene"
2. In Hierarchy window, select "GameObject"
3. In Inspector window, press "Test (Script)" -> "Change material"
4. Observe Console window
5. In Unity menu, press "Edit" -> "Undo Change Material" (or Ctrl + z)
6. Observe Console window

Expected result: after undoing, the order of "Undo.undoRedoPerformed" remains the same
Actual result: after undoing, the order of "Undo.undoRedoPerformed" changes

Reproducible with: 2018.3.0a8, 2018.3.0f1, 2019.1.0a10
Not reproducible with: 2017.2.5f1, 2017.4.16f1, 2018.2.19f1, 2018.3.0a7

  1. Resolution Note:

    We will keep the new behavior since when Undo.undoRedoPerformed is called the Inspector has been rebuilt (if needed) to show the new state (that was a result of the Undo operation). We have logic that depends on this call order now (EditorTools).

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.