private void OnDestroy() { m_graph.OnNodeDeselect(this); foreach (var child in m_children) { BTEditorGraphNode.DestroyImmediate(child); } }
public void OnDelete() { if (m_parent != null) { m_parent.RemoveChild(this); BTEditorGraphNode.DestroyImmediate(this); } }
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(); }
private void DestroyChildren() { for (int i = 0; i < m_children.Count; i++) { BTEditorGraphNode.DestroyImmediate(m_children[i]); } if (m_node is Composite) { ((Composite)m_node).RemoveAllChildren(); } else if (m_node is Decorator) { ((Decorator)m_node).SetChild(null); } m_children.Clear(); }
private void OnDestroy() { BTEditorGraphNode.DestroyImmediate(m_masterRoot); m_masterRoot = null; m_rootStack.Clear(); }