How to spawn a Wave only after all last wave enemies are gone

Hi, I feel a little Unsatisfied that the waves spawn one after another without a way to stop and let the player the effort to eliminate all the enemies.
I would like to spawn a wave only after the last wave is finished.
Can anyone help me with that?

Hi ilay,

If you spawn the enemies and parent them to a game object, you could check the childCount of that root game object to determine if the next wave is allowed to be spawned. Check the API to learn how to access the childCount. With return null;, you can make the coroutine wait for one frame.

Good luck! :slight_smile:


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms