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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
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.