You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Undo.postprocessModifications to notice changes done.
Set the backing field to previousValue if Unity already changed it.
Call the setter, passing currentValue.
Use Undo.undoRedoPerformed to get told about undo or redo happening.
Since this event doesn't tell us what actually happened (undo or redo?), nor which property it affected, we need to check that ourselves. Do so by remembering the postprocessModifications above and go through each of those SerializedPropertys to compare their serialized value (which is the current value after Unity did this undo/redo operation) against the remembered values.
Revert the backing field to the "previous" value.
Call the setter, passing the "current" value retrieved previously from the SerializedProperty.
Replace Zinnia.ObservableListEditor by merging its functionality into this overhauled way instead.
InspectorEditor
.Undo.postprocessModifications
to notice changes done.previousValue
if Unity already changed it.currentValue
.Undo.undoRedoPerformed
to get told about undo or redo happening.postprocessModifications
above and go through each of thoseSerializedProperty
s to compare their serialized value (which is the current value after Unity did this undo/redo operation) against the remembered values.SerializedProperty
.Zinnia.ObservableListEditor
by merging its functionality into this overhauled way instead.Related.
The text was updated successfully, but these errors were encountered: