EndChangeCheck around OdinEditor.DrawOdinInspector returns false when multiple objects are selected

Issue #703 open
Lazlo Bonin created an issue

I’m trying to detect changes in a Odin editor by overriding the following:

    public override void OnInspectorGUI()
    {
      EditorGUI.BeginChangeCheck();
      this.DrawOdinInspector();
      Debug.Log(EditorGUI.EndChangeCheck());
    }

This logs true as expected when a single object is selected, but when multiple objects are selected, it always returns false.

Comments (3)

  1. Tor Esa Vestergaard

    Meanwhile, by the way, it is probably easier and more precise to subscribe to OnPropertyValueChanged on base.Tree, as that will also tell you exactly what changed. Having a base.Tree does assume that you’ve derived from an OdinEditor.

  2. Log in to comment