/// <summary> /// Changes the handler currently displayed /// </summary> /// <param name="handler">Handler.</param> protected virtual void ChangeEventHandler(EventHandler handler) { Reset(); m_handler = handler; if (m_handler != null) { m_handler.CreateEventNode(); } }
/// <summary> /// Raises the GUI event. /// </summary> private void OnGUI() { FetchEventHandler(); if (m_handler != null && m_handler.EventNode == null) { m_handler.CreateEventNode(); } EditorGUIUtility.labelWidth = 80; if (m_handler != null) { FetchActions(); CheckSelectedActionBox(); CheckSelectedNode(); DrawBackground(); DisplayAllConnections(); if (m_selectedNode != null) { DisplayDrawingConnection(); } } DisplaySidebar(); if (m_handler != null) { DisplayBlueprint(); } EditorGUIUtility.labelWidth = 0; }