- Home /
Which setup should I use for spawning?
Hi, I'm about to add a spawner to my game but I'm having some trouble figuring out the best way to go about it. The idea is that I have 2 vertical walls and would like to spawn things from them depending on the current height. I already have 2 spawning cycles set up but they are for a drop spawner.
I have several ideas but I don't know which is the more efficient way of going about it. Is it better to set up 1 script with if statements and stash all my arrays there? Or should I make a trigger zone and just get the colliders height value and pass it into a switch/case? Or should I make several spawn zones each with its own script. The point is that between 500f and 1000f it will spawn x, 1000f and 1500f spawn y etc. Just give me a pointer I'm pretty sure I can figure how to code it myself. However if you feel particularly eager to educate me, please use C#. Thanks for the time.
id personally just keep it to one script it will keap your assets cleaner for a start.