Search Issue Tracker
By Design
Votes
0
Found in
2019.2.0a1
2019.3.0a1
2019.3.0f3
2020.1.0a1
Issue ID
1205928
Regression
No
Undo/Redo action invalidate SerializedObject in Inspector when adding/removing elements in array using SerializedProperty
How to reproduce:
1. Open attached project ("SO-REPRO.zip")
2. Create SerializedObject asset (Assets->Create->BugReport->SO)
3. Select "testasset" asset
4. Open Inspector window
5. Press + sign multiple times
6. Perform undo action multiple times (CTRL-Z or Edit->Undo Inspector)
7. Press + sign multiple times
Expected result: First and further Undo/Redo calls are performed as expected
Actual result: First Undo/Redo isn't performed
Reproducible with: 2019.2.17f1, 2019.3.0f3, 2020.1.0a17
Not tested with: 2017.4.35f1, 2018.4.15f1 (no suitable method found to override CreateInspectorGUI())
Notes:
- After Undo/Redo call first + (add) action isn't performed
- After Undo/Redo call last entry - (remove) action isn't performed at all
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
- Mouse input is registered incorrectly in Custom RP when downscaling Render Target and rendering Overlay UI before final upscale
- Time.deltaTime is locked to the display's refresh rate when the built Player is moved to a Secondary Display and Windowed Mode is used
- Crash on RaiseException when importing a specific asset
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
Resolution Note (2020.1.X):
When reacting to Undo.undoRedoPerformed, the serializedObject has not been updated by the inspector just yet. The workaround is to either wait until the next frame so the inspector has updated the serializedObject, or do it ourselves.
From 19.3, one can use a ListView with serializedObjectBindings to automatically refresh arrays.