private void OnDoubleClicked() { if (m_node is RunBehaviour) { RunBehaviour rb = (RunBehaviour)m_node; if (rb.BehaviourTreeAsset != null) { if (BTEditorCanvas.Current.IsDebuging && rb.BehaviourTree != null) { BehaviourTreeEditor.OpenSubtreeDebug(rb.BehaviourTreeAsset, rb.BehaviourTree); } else { BehaviourTreeEditor.OpenSubtree(rb.BehaviourTreeAsset); } } } if (m_node is RunBehaviourIndex) { RunBehaviourIndex rb = (RunBehaviourIndex)m_node; if (rb.SubTreeIndex >= 0) { if (BTEditorCanvas.Current.IsDebuging && rb.BehaviourTree != null) { BehaviourTreeEditor.OpenIndexSubtreeDebug(rb.SubTreeIndex, rb.BehaviourTree); } else { BehaviourTreeEditor.OpenIndexSubtree(rb.SubTreeIndex); } } } else if (m_node is NodeGroup) { if (IsRoot) { m_graph.OnPopNodeGroup(); } else { m_graph.OnPushNodeGroup(this); } } }