private GameObject Level; private IEnumerator LoadLevel(int i) { . . . Destroy(Level); . . . Level = Instantiate(Resources.Load<gameobject>("L/L" + i), transform.position, Quaternion.identity); . . . }
This is what's actually happening behind the scenes.