Quantcast
Channel: Questions in topic: "loops"
Viewing all articles
Browse latest Browse all 184

i have a list of transforms and i want to spawn a prefab once for all the transforms in the list.

$
0
0
as above but i just can seem to get this working at all! sorry if the question is structured bad in advance, its my first post. if i have: //generated on start int numAliens; //generated on start. a list of the desired spawn locations public List AlienPos = new List(); //the prefabbed alien . i hope to make this an array of multiple prefabs at some point public GameObject AlienPrefab; //respawn all enemys void rePopWave(){ while(numAliens > 0) { numAliens++; //Instantiate(AlienPrefab, AlienPos[numAliens], Quaternion.identity); Debug.Log ("THEY ARE BACK"); } }

Viewing all articles
Browse latest Browse all 184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>