예제 #1
0
        private void OnEnable()
        {
            runner.Module = module;
            var assetMCHS = AssetsTreeView.CreateDefaultHeaderState();

            if (MultiColumnHeaderState.CanOverwriteSerializedFields(assetTreeHeaderState, assetMCHS))
            {
                MultiColumnHeaderState.OverwriteSerializedFields(assetTreeHeaderState, assetMCHS);
            }
            assetTreeHeaderState = assetMCHS;

            assetTree = new AssetsTreeView(assetTreeViewState, new MultiColumnHeader(assetTreeHeaderState), module.ModuleConfig, module.StateConfig);
        }
예제 #2
0
        private void Awake()
        {
            InitStyles();

            module.LoadConfigs();
            if (!string.IsNullOrEmpty(module.StateConfig.Json.CurrentMapFilePath) && File.Exists(module.StateConfig.Json.CurrentMapFilePath))
            {
                module.ModuleConfig.AllBundles = JsonConvert.DeserializeObject <BundleRDDictionary>(File.ReadAllText(module.StateConfig.Json.CurrentMapFilePath));
            }

            assetTreeViewState   = new TreeViewState();
            assetTreeHeaderState = AssetsTreeView.CreateDefaultHeaderState();

            #region InitRect
            splitterRect = new Rect(module.ModuleConfig.Json.InitialLeftWidth + margin,
                                    headHeight, splitterWidth, position.height - headHeight - margin);
            leftRect  = new Rect(margin, headHeight, splitterRect.x - margin, position.height - headHeight - margin);
            rightRect = new Rect(splitterRect.x + splitterWidth, headHeight,
                                 position.width - splitterRect.x - splitterWidth - margin, position.height - headHeight - margin);
            #endregion
        }