public static void SetMainWindowSizeSmall() { MainView mainView = Resources.FindObjectsOfTypeAll <MainView>()[0]; mainView.window.position = new Rect(0f, 0f, 762f, 600f); }