Exemplo n.º 1
0
        private void Awake()
        {
            //初始化分割条的Rect
            ComputeRects();
            m_splitterRect = new Rect(
                (int)(downFixedRect.x + downFixedRect.width * m_splitterPercent - k_SplitterWidth / 2), downFixedRect.y,
                k_SplitterWidth, downFixedRect.height);
            //------------------

            G.Init();

            settingPanel = new SettingPanel();
            settingPanel.Awake();

            bundleTreeViewState   = new TreeViewState();
            bundleTreeHeaderState = BundleTree.CreateDefaultHeaderState(leftRect.width);

            packageTreeViewState   = new TreeViewState();
            packageTreeHeaderState = PackageTree.CreateDefaultHeaderState(rightRect.width);
        }
Exemplo n.º 2
0
        private void OnEnable()
        {
            MultiColumnHeaderState bundleMCHS  = BundleTree.CreateDefaultHeaderState(leftRect.width);
            MultiColumnHeaderState packageMCHS = PackageTree.CreateDefaultHeaderState(rightRect.width);

            if (MultiColumnHeaderState.CanOverwriteSerializedFields(bundleTreeHeaderState, bundleMCHS))
            {
                MultiColumnHeaderState.OverwriteSerializedFields(bundleTreeHeaderState, bundleMCHS);
            }
            bundleTreeHeaderState = bundleMCHS;

            if (MultiColumnHeaderState.CanOverwriteSerializedFields(packageTreeHeaderState, packageMCHS))
            {
                MultiColumnHeaderState.OverwriteSerializedFields(packageTreeHeaderState, packageMCHS);
            }
            packageTreeHeaderState = packageMCHS;

            G.g.bundleTree = new BundleTree(bundleTreeViewState, new MultiColumnHeader(bundleTreeHeaderState),
                                            settingPanel.LoadBundlesFromConfig, settingPanel.BundleConfigPath);
            G.g.packageTree = new PackageTree(packageTreeViewState, new MultiColumnHeader(packageTreeHeaderState));
        }