Beispiel #1
0
        private void ExitSession()
        {
            if (null == Session)
            {
                return;
            }

            Session.GetManager <IChangeManager>().UnregisterChangeCallback(HandleChanges);
            m_AuthoringRoot.style.display    = DisplayStyle.None;
            m_NonAuthoringRoot.style.display = DisplayStyle.Flex;
            m_TreeView?.Dispose();
            m_TreeView = null;
        }
Beispiel #2
0
        private void EnterSession()
        {
            if (null == Session)
            {
                return;
            }

            // TODO: Track state
            if (null == m_ContentState)
            {
                m_ContentState = new TreeViewState();
            }

            m_TreeView = new EntityHierarchyTree(Session, m_ContentState);
            m_AuthoringRoot.style.display    = DisplayStyle.Flex;
            m_NonAuthoringRoot.style.display = DisplayStyle.None;
            m_ComponentCache = Session.GetManager <UnityComponentCacheManager>();
            Session.GetManager <IChangeManager>().RegisterChangeCallback(HandleChanges);
        }