i have this
IEnumerator ShowExitNow()
{
GameObject[] obstacles = GameObject.FindGameObjectsWithTag("Exit");
foreach (GameObject obst in obstacles)
{
obst.GetComponent<ExitTile>().ActivateMeNow();
yield return null;
}
}
Now i get that this is taking all the Exit tag objects and activate their functions. How to make it pick one out of all the Exit tagged objects. A example would be great.