void Start() { GameObject[] NPCs = GameObject.FindGameObjectsWithTag("NPC"); foreach (GameObject obj in NPCs) { NPCInfo temp = new NPCInfo(); temp.SetGameObject(obj); temp.SetLeader(false); temp.SetBehaviour(NPC.BehaviourType.Wander); NPCInfos.Add(temp); } generalBehavior = NPC.BehaviourType.Wander; SetFormation(GetMiddleNPC()); }