Calling EditorWindow.Close() from within a [Button] causes a null ref exception
Issue #442
resolved
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)
-
reporter -
- changed status to resolved
- Log in to comment
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()