public static void DeleteGUI() { View view = WindowLayout.FindMainView(); Rect screenPosition = view.screenPosition; DeleteWindowLayout windowWithRect = EditorWindow.GetWindowWithRect <DeleteWindowLayout>(new Rect(screenPosition.xMax - 180f, screenPosition.y + 20f, 200f, 150f), true, "Delete Window Layout"); windowWithRect.m_Parent.window.m_DontSaveToLayout = true; }