private void CreateWindow()
        {
            if (isOpen)
            {
                Close();
            }

            window         = ScriptableObject.CreateInstance <WrappedEditorWindow>();
            window.wrapper = this;
            ConfigureWindow();
            OnShow(); // HACK: Can't use WrappedEditorWindow.Awake/OnEnable, because it's called before we set the wrapper.
        }
        public void Close()
        {
            try
            {
                window?.Close();
            }
            catch (NullReferenceException)
            {
                // EditorWindow.Close throws an NRE when it's
                // closed before the first frame it was opened.
            }

            window = null;
        }