Exemplo n.º 1
0
        public void SetBehaviourTree(BehaviourTree behaviourTree)
        {
            if (m_masterRoot != null)
            {
                BTEditorGraphNode.DestroyImmediate(m_masterRoot);
                m_masterRoot = null;
                m_rootStack.Clear();
            }

            m_isBehaviourTreeReadOnly = behaviourTree.ReadOnly;
            m_masterRoot = BTEditorGraphNode.CreateRoot(this, behaviourTree.Root);
            m_rootStack.Push(m_masterRoot);
            BTUndoSystem.Clear();
        }