private void OnGUI()
        {
            GUILayout.Space(6);

            if (GUILayout.Button("Canvasを検索", GUILayout.Width(120f), GUILayout.Height(20f)))
            {
                var canvases = SearchAllCanvases();
                _canvasSet = new OrderedCanvasSet(canvases);
                _treeView.Setup(_canvasSet);
            }

            GUILayout.Space(4);

            if (_canvasSet == null)
            {
                return;
            }

            _scrollPosition = EditorGUILayout.BeginScrollView(_scrollPosition);
            var rect = EditorGUILayout.GetControlRect(false, position.height - 40);

            _treeView.OnGUI(rect);
            EditorGUILayout.EndScrollView();
        }
Exemplo n.º 2
0
 /// <summary>
 /// Canvasの集合を指定してセットアップする
 /// </summary>
 public void Setup(OrderedCanvasSet set)
 {
     _set = set;
     Reload();
     ExpandAll();
 }