So yay! I finally built to my phone and I’m noticing a slight pause in the gameplay when their is a new wave of enemies spawned.
I know that it is from my instantiating them. So I need to change that into an array of enemy game object held off screen, and the spawner needs to pull from that array. However. How does that work?
I remember someone telling me about this “first one in, last one out” system. But I’ve done a search and so far I can’t find even a mention of this system, let alone an example of how it works.
what you are looking for is objects pool. in object pool you pre create the objects and then just enable them when you need them. when you done you disable them and they return to the pool.