public static void OpenWindow() { NavmeshBuildManager window = EditorWindow.GetWindow <NavmeshBuildManager>(false , WindowTitle); window.Show(); window.Focus(); }
private static void OnGUIAdvanced(NavmeshBuild build) { EditorGUILayout.Separator(); if (GUILayout.Button("Manage Build")) { NavmeshBuildManager.OpenWindow(); } //// Only allow a reset when not in the buildable state. if (build.BuildState != NavmeshBuildState.Inactive) { GUI.enabled = true; EditorGUILayout.Separator(); if (GUILayout.Button("Reset Build")) { build.ResetBuild(); } } }
void OnGUI() { Rect area = new Rect(ControlUtil.MarginSize , ControlUtil.MarginSize , position.width - 2 * ControlUtil.MarginSize , position.height - 2 * ControlUtil.MarginSize); GUILayout.BeginArea(area); GUILayout.Label("Maximum Concurrency"); int orig = BuildProcessor.MaxConcurrency; int val = (int)EditorGUILayout.Slider(orig, 1, System.Environment.ProcessorCount); if (orig != val) { BuildProcessor.MaxConcurrency = val; } // TODO: Review threading recommendation after below noted bug is fixed. GUILayout.Box("Recommended: " + BuildProcessor.DefaultConcurrency + "\nWill take effect next processor start." + "\nWarning: Threading bugs in Unity Editor 3.5 can cause problems if set" + " to a higher value." , EditorUtil.HelpStyle, GUILayout.ExpandWidth(true)); GUILayout.Space(ControlUtil.MarginSize * 2); if (GUILayout.Button("Force Processor Reset")) { NavmeshBuildManager.ForceProcessorReset(); } GUILayout.EndArea(); }