protected override void OnAwake() { AITreeNode[] treeNodes = new AITreeNode[transform.childCount]; base.OnAwake(); for (int nodeEnumIdx = 0; nodeEnumIdx < treeNodes.Length; ++nodeEnumIdx) { AITreeNode node = transform.GetChild(nodeEnumIdx).GetComponent <AITreeNode>(); treeNodes[nodeEnumIdx] = node; } m_Nodes = new List <AITreeNode>(); m_Nodes.AddRange(treeNodes); }
private void Awake() { startNode = transform.GetChild(0).GetComponent <AITreeNode>(); npc = transform.parent.GetComponent <BaseActor>(); }