示例#1
0
        public void SetBehaviourTree(BTAsset asset, BehaviourTree behaviourTree)
        {
            this.m_asset   = asset;
            this.m_bevTree = 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();
        }