public void DrawToolBar(Rect toolbarBound) { GUI.BeginGroup(toolbarBound, EditorStyles.toolbar); var addBunttonRect = new Rect(0f, 0f, 40f, toolbarBound.height); if (GUI.Button(addBunttonRect, "Add", EditorStyles.toolbarButton)) { BatchBuildConfig.CreateNewGraphCollection("New Collection"); m_collectionTree.Reload(); } GUI.EndGroup(); }
public void OnEnable(Rect pos, EditorWindow parent) { m_Parent = parent; m_Position = pos; m_HorizontalSplitterRect = new Rect( (int)(m_Position.x + m_Position.width * m_HorizontalSplitterPercent), m_Position.y, k_SplitterWidth, m_Position.height); m_GraphCollectionTreeState = new TreeViewState(); m_collectionTree = new GraphCollectionTree(m_GraphCollectionTreeState, this); m_GraphCollectionDetailTreeState = new TreeViewState(); m_detailTree = new GraphCollectionDetailTree(m_GraphCollectionDetailTreeState, this); m_collectionTree.Reload(); m_detailTree.Reload(); }