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
- ScrollView clips content when under an ancestor that has a filter set
- "Retrieving array element that was out of bounds" error thrown when attempting to remove a column from a Multi-Column List View
- Multi-Column List View horizontal scroll resets to left most position when scrolling vertically
- Floating License is lost for concurrent jobs
- Warning "Failed to insert item" is logged when Assigning Project to Organization's Project in the Project Settings
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.