public override void OnInspectorGUI() { this.undoManager.CheckUndo(); MenuBar.OnGUI("288079-eventmanager", true, null); if (this.eventManager == null) { return; } GUILayout.BeginVertical("box", new GUILayoutOption[0]); this.eventManager._logHistorySize = EditorGUILayout.IntSlider("Log History:", this.eventManager._logHistorySize, 0, 1000, new GUILayoutOption[0]); this.eventManager._forceQueueAllEvents = EditorGUILayout.Toggle("Force Queue All Events:", this.eventManager._forceQueueAllEvents, new GUILayoutOption[0]); GUILayout.BeginHorizontal(new GUILayoutOption[0]); GUILayout.Label("Num of Events in Queue: " + this.eventManager.NumOfEventsInQueue(), new GUILayoutOption[0]); GUILayout.EndHorizontal(); GUILayout.Space(10f); GUILayout.Label("CPU:" + this.eventManager.profiler.percent.ToString("0.000") + "% - ms:" + this.eventManager.profiler.msPerFrame.ToString("0.000"), new GUILayoutOption[0]); GUILayout.Space(10f); if (GUILayout.Button("Open Editor Window", new GUILayoutOption[0])) { EventManagerExWindow.Open(eventManager); } GUILayout.EndVertical(); this.DrawEventListMenu(); GUILayout.Space(10f); this.eventManager._eventListFoldout = EditorGUILayout.Foldout(this.eventManager._eventListFoldout, "Event List"); if (this.eventManager._eventListFoldout) { GUILayout.BeginVertical("box", new GUILayoutOption[0]); this.DrawEventList(); GUILayout.EndVertical(); } GUIHelpers.CheckGUIHasChanged(this.eventManager.gameObject); this.undoManager.CheckDirty(); }
public static void Open(EventManagerEx manager) { mWindow = EditorWindow.GetWindow <EventManagerExWindow>(); mWindow.titleContent = new UnityEngine.GUIContent(" 添加音效拓展工具 "); mWindow.position = new Rect((Screen.currentResolution.width - 640) / 2, (Screen.currentResolution.height - 480) / 2, 640, 480); mWindow.InitWindow(manager); }