5 minutes
Spawn Waves of Enemies
One enemy you can kill is a target, not a game. You need a lot of them, and there's a wrong way to get them: call new for a fresh enemy on every spawn, then throw it away when it dies. That is how an arcade game stutters — the garbage collector wakes up in the middle of a fight and drops a frame. So the waves come from a pool instead: build a fixed set of enemies once, then hand them out and take them back, over and over.
The pool you already built
Across Lessons 5 and 6 you built that fixed set: the Enemies pool. Its Pool blueprint carries the whole enemy — the TwinStickEnemy brain, its LineOfSight, Health, Shadow, the Mesh GLB, and the SkeletonAnimator, all riding a collision-proxy MeshPrimitive. Sixteen copies were stamped out and parked offstage the instant the scene loaded, fully equipped but dormant, because nothing has spawned one yet. Here is the blueprint your src/scenes/TwinStickArena.json already carries:
Pool is a marker that draws nothing and moves nothing. It flags this entity as a blueprint: a template the pool stamps onto every slot, so every other component on Enemies is the set each pooled enemy carries. It's the component block from Lesson 5, rounded out with the health and line-of-sight pieces from Lesson 6, pasted in as ordinary keys. No nesting.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.