static void DrawBuildButton() { if (GUI.Button(new Rect(Screen.width * 0.8f, Screen.height - 40, Screen.width * 0.20f, 30), "Build & Upload")) { string error = ""; if (CanBuild(ref error)) { DeployGateWindow.CloseWindow(); DeployGateBuildPipeline.Build(messages[0]); } else { DeployGateWindow.GetWindow().ShowNotification(new GUIContent(error)); } EditorGUIUtility.ExitGUI(); } }