public static void MakeMain() { ContainerWindow window = ScriptableObject.CreateInstance <ContainerWindow>(); MainWindow window2 = ScriptableObject.CreateInstance <MainWindow>(); window2.SetMinMaxSizes(new Vector2(770f, 300f), new Vector2(10000f, 10000f)); window.mainView = window2; Resolution desktopResolution = InternalEditorUtility.GetDesktopResolution(); int num = Mathf.Clamp((desktopResolution.width * 3) / 4, 800, 0x578); int num2 = Mathf.Clamp((desktopResolution.height * 3) / 4, 600, 950); window.position = new Rect(60f, 20f, (float)num, (float)num2); window.Show(ShowMode.MainWindow, true, true); window.DisplayAllViews(); }
public static void MakeMain() { ContainerWindow containerWindow = ScriptableObject.CreateInstance <ContainerWindow>(); MainWindow mainWindow = ScriptableObject.CreateInstance <MainWindow>(); mainWindow.SetMinMaxSizes(MainWindow.kMinSize, MainWindow.kMaxSize); containerWindow.mainView = mainWindow; Resolution desktopResolution = InternalEditorUtility.GetDesktopResolution(); int num = Mathf.Clamp(desktopResolution.width * 3 / 4, 800, 1400); int num2 = Mathf.Clamp(desktopResolution.height * 3 / 4, 600, 950); containerWindow.position = new Rect(60f, 20f, (float)num, (float)num2); containerWindow.Show(ShowMode.MainWindow, true, true); containerWindow.DisplayAllViews(); }