void recreateLevel() { for (int i = 0; i < level.Length; i++) { GameObject temp = Instantiate(polePref, level[i].trans.position, Quaternion.identity); temp.transform.parent = terrain.transform; Pole poleScript = temp.GetComponent <Pole>(); poleScript.x = level[i].x; poleScript.y = level[i].y; poleScript.height = level[i].height; temp.transform.localScale = new Vector3(temp.transform.localScale.x, level[i].height, temp.transform.localScale.z); map.level[level[i].x, level[i].y] = temp; } map.initDelayCaller(); }