示例#1
0
        public static AssetPostprocessorConfigTab Get()
        {
            var treeView = new AssetPostprocessorConfigTab(new TreeViewState());

            treeView.Reload();
            return(treeView);
        }
示例#2
0
        private void ShowSubTabs()
        {
            subRect = GetSubWindowArea();
            if (configTab == null)
            {
                folderTab    = folderTab ?? AssetPostprocessorFolderTab.Get(this);
                configTab    = configTab ?? AssetPostprocessorConfigTab.Get();
                setTab       = setTab ?? new AssetPostprocessorSetTab();
                assetListTab = assetListTab ?? AssetListTab.Get();

                configTab.DeleteSoAssetPostprocessor += OnDeleteSoAssetPostprocessor;
                configTab.OnChanged += OnSoPostprocessorChanged;
                setTab.OnChanged    += OnSoPostprocessorSetChangee;
            }

            HandleHorizontalResize();
            HandleVerticalResize();

            var assetFolderRect = new Rect(subRect.x, subRect.y, subRect.width * horizontalLeftSplitterPercent, subRect.height);

            var assetListRect = new Rect(subRect.x + subRect.width * horizontalRightSplitterPercent, subRect.y, subRect.width * (1 - horizontalRightSplitterPercent), subRect.height);

            var configTabRect = new Rect(subRect.x + assetFolderRect.width + splitterWidth, subRect.y, assetListRect.x - assetFolderRect.xMax - 2 * splitterWidth, subRect.height * verticalSplitterPercent);

            var detailTabRect = new Rect(subRect.x + assetFolderRect.width + splitterWidth, subRect.y + configTabRect.height + splitterWidth, configTabRect.width, subRect.height - configTabRect.height - splitterWidth);

            folderTab.SetAssetType(selectAssetType);
            var selectFolderPath = folderTab.GetSelectPostprocessorFolder();

            configTab.SetAssetType(selectAssetType);
            configTab.SetPostprocessorFolder(selectFolderPath);
            var selectGuid = configTab.GetSelectSoPostprocessorGuid();

            setTab.SetPostprocessor(selectAssetType, selectGuid);
            assetListTab.SetFolder(selectAssetType, selectFolderPath);

            configTab.OnGUI(configTabRect);
            folderTab.OnGUI(assetFolderRect);
            setTab.OnGUI(detailTabRect);
            assetListTab.OnGUI(assetListRect);
        }