ExtendRealityLtd / ExtendRealityLtd/Malimbe
Overhaul MemberChange
- Dominant language
- C#
- Stars
- 52
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
* Get rid of `InspectorEditor`.
* 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 `SerializedProperty`s 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.
[Related](https://assetstore.unity.com/packages/tools/utilities/property-backing-field-drawer-18253).
Contributor guide
Assessment
This issue has not been assessed yet.