ExtendRealityLtd / ExtendRealityLtd/Malimbe

Overhaul MemberChange

Open
#38 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.