Skip to content

Overhaul MemberChange #38

@bddckr

Description

@bddckr
  • 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 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.

Related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions