Answer the question
In order to leave comments, you need to log in
Why does the code work out of order?
There is such code -
foreach (GameObject o in GameObject.FindGameObjectsWithTag("loc"))
{
Destroy(o);
}
Instantiate(GameObject.Find("Camera").GetComponent<LibLevels>().Levels[GameData.locID], new Vector3(), Quaternion.identity);
List<GameObject> Doors = new List<GameObject>(GameObject.FindGameObjectsWithTag("door"));
for (int i = 0; i < Doors.Count - 1; i++)
{
GameObject g = Doors[i];
if (GameData.isOpen[i])
{
Debug.Log(g.name);
g.GetComponent<Door>().Open();
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question