Calling EditorWindow.Close() from within a [Button] causes a null ref exception

Issue #442 resolved
Vestigial Bidya created an issue

Create an OdinEditorWindow, give it a [Button] that calls a method that calls Close(), and when you click the button, null ref exception.

See the attached script

Unity2018.3.0b3 Windows 10

Comments (2)

  1. Vestigial Bidya reporter

    A workaround is to instead of calling Close() from the [button] function, instead hook up to UnityEditor.EditorApplication.delayCall and when that is called, then do the close()

  2. Log in to comment