public void CreateStairhole() { //Debug.Log("test"); //Debug.Log(spawnedStairs); //Debug.Log(waitTime); RoomTemplates roomTemplates = FindObjectOfType <RoomTemplates>(); if (roomTemplates.spawnedStairs == true) { Debug.Log("I Did it!"); for (int i = 0; i < roomTemplates.obstacles.Length; i++) { if (i == roomTemplates.obstacles.Length - 1) { roomTemplates.DestroyObsCenter(i); //Debug.Log("I Did it!"); } } } else { //waitTime -= Time.deltaTime; } }