// Use this for initialization void Start() { navMeshAgent = this.GetComponent <NavMeshAgent>(); if (gameManager == null) { gameManager = FindObjectOfType <GameManager>(); } if (Exit == null) { Exit = GameObject.FindGameObjectWithTag("Exit").GetComponent <Transform>(); } foreach (GameObject g in GameObject.FindGameObjectsWithTag("Display")) { Waypoints.Add(g.transform); ObjectsToVisit++; } Utilitys.ShuffleArray <Transform>(Waypoints); }