// Internal stuff: // Helper to show this EditorWindow internal static void CreateNewWindowForEditorWindow(EditorWindow window, bool loadPosition, bool showImmediately, bool setFocus = true) { ContainerWindow cw = ScriptableObject.CreateInstance <ContainerWindow>(); SplitView sw = ScriptableObject.CreateInstance <SplitView>(); cw.rootView = sw; DockArea da = ScriptableObject.CreateInstance <DockArea>(); da.AddTab(window, setFocus); sw.AddChild(da); Rect r = window.m_Parent.borderSize.Add(window.position); cw.position = r; sw.position = new Rect(0, 0, r.width, r.height); window.MakeParentsSettingsMatchMe(); cw.Show(ShowMode.NormalWindow, loadPosition, showImmediately, setFocus: true); //Need this, as show my change the size of the window, due to screen constraints cw.OnResize(); cw.UnsavedStateChanged(); }