Exemple #1
0
        private HierarchyRootPseudoScene CreatePseudoSceneInternal(string scene)
        {
            HierarchyItemRoot pseudoSceneDrawer = InstantiateSceneDrawer(new HierarchyRootPseudoScene(scene));

            sceneDrawers.Add(pseudoSceneDrawer);
            pseudoSceneDrawers[scene] = pseudoSceneDrawer;

            int index = 0;

            for (int i = 0; i < pseudoScenesOrder.Length; i++)
            {
                if (pseudoScenesOrder[i] == scene)
                {
                    break;
                }

                if (pseudoSceneDrawers.ContainsKey(pseudoScenesOrder[i]))
                {
                    index++;
                }
            }

            pseudoSceneDrawer.transform.SetSiblingIndex(index);

            return((HierarchyRootPseudoScene)pseudoSceneDrawer.Content);
        }
Exemple #2
0
        private void OnSceneLoaded(Scene arg0, LoadSceneMode arg1)
        {
            if (!ExposeUnityScenes)
            {
                return;
            }

            if (!arg0.IsValid())
            {
                return;
            }

            for (int i = 0; i < sceneDrawers.Count; i++)
            {
                if ((sceneDrawers[i].Content is HierarchyRootScene) && ((HierarchyRootScene)sceneDrawers[i].Content).Scene == arg0)
                {
                    return;
                }
            }

            HierarchyItemRoot sceneDrawer = InstantiateSceneDrawer(new HierarchyRootScene(arg0));

            sceneDrawers.Add(sceneDrawer);

            sceneDrawer.IsExpanded = true;
        }
Exemple #3
0
        private HierarchyRootPseudoScene CreatePseudoSceneInternal(string scene)
        {
            int index = 0;

            for (int i = 0; i < pseudoScenesOrder.Length; i++)
            {
                if (pseudoScenesOrder[i] == scene)
                {
                    break;
                }

                if (pseudoSceneDrawers.ContainsKey(pseudoScenesOrder[i]))
                {
                    index++;
                }
            }

            HierarchyItemRoot pseudoSceneDrawer = InstantiateSceneDrawer(new HierarchyRootPseudoScene(scene), drawAreaHierarchy);

            sceneDrawers.Insert(index, pseudoSceneDrawer);
            pseudoSceneDrawers[scene] = pseudoSceneDrawer;

            HierarchyItemRoot searchResultDrawer = InstantiateSceneDrawer(new HierarchyRootSearch(this, pseudoSceneDrawer.Content), drawAreaSearchResults);

            searchSceneDrawers.Insert(index, searchResultDrawer);

            pseudoSceneDrawer.transform.SetSiblingIndex(index);
            pseudoSceneDrawer.IsExpanded = true;

            searchResultDrawer.transform.SetSiblingIndex(index);

            return((HierarchyRootPseudoScene)pseudoSceneDrawer.Content);
        }
Exemple #4
0
        public void RefreshSearchResults()
        {
            if (!m_isInSearchMode)
            {
                return;
            }

            for (int i = 0; i < searchSceneDrawers.Count; i++)
            {
                HierarchyItemRoot sceneDrawer = searchSceneDrawers[i];
                sceneDrawer.Refresh();

                if (sceneDrawer.Content.Children.Count > 0)
                {
                    if (!sceneDrawer.gameObject.activeSelf)
                    {
                        sceneDrawer.gameObject.SetActive(true);
                        sceneDrawer.IsExpanded = true;
                    }
                }
                else if (sceneDrawer.gameObject.activeSelf)
                {
                    sceneDrawer.gameObject.SetActive(false);
                }
            }
        }
Exemple #5
0
        private HierarchyItemRoot InstantiateSceneDrawer(IHierarchyRootContent target)
        {
            HierarchyItemRoot sceneDrawer = (HierarchyItemRoot)InstantiateDrawer(sceneDrawerPool, sceneDrawerPrefab, drawArea);

            sceneDrawer.BindTo(target);

            return(sceneDrawer);
        }
Exemple #6
0
        public HierarchyItemRoot InstantiateSceneDrawer(IHierarchyRootContent target, Transform drawerParent)
        {
            HierarchyItemRoot sceneDrawer = (HierarchyItemRoot)InstantiateDrawer(sceneDrawerPool, sceneDrawerPrefab, drawerParent);

            sceneDrawer.BindTo(target);

            return(sceneDrawer);
        }