Shape Spawners¶
Shape spawners decide where an agent can appear. Two are included.
Swarm Rect Spawner¶
Spawns agents in a rectangular area. Use it for waves entering from an edge or side of the level.
Add via right-click in Hierarchy → Massive Swarm System → Spawners → Rect Spawner.
Swarm Ring Spawner¶
Spawns agents in a ring around a center point. Use it for ambushes or encirclement setups.
Add via right-click in Hierarchy → Massive Swarm System → Spawners → Ring Spawner.
Key fields¶
| Field | What it does |
|---|---|
| Spawn Profile | The SwarmAgentArchetype used by this spawner when it spawns directly (no director) or when the director's composition list is empty. |
| Auto Spawn | When on, this spawner spawns the auto-spawn count itself on Start or OnEnable. Turn this off when a director drives the spawner. |
| Auto Spawn Trigger | When Auto Spawn is on, choose On Start to fire once the first time the scene loads, or On Enable to fire every time the component is enabled. |
| Auto Spawn Count | How many agents Auto Spawn requests. A newly added spawner defaults to 32 agents. |
| Spawn Area | The shape fields — Rect Extents on the Rect Spawner, Spawn Radius and Spawn Width on the Ring Spawner. |
| Follow Target | Optional transform the spawn area centers on and moves with. Assign the player to keep spawns around them wherever they go. |
| Local Offset | Shifts the area's center in the Follow Target's local space (or the spawner's own when none is set). Z pushes it forward — for example ahead of the player. |
| Agent Facing | Which way agents point at the moment they spawn: Spawn Area Forward points everyone the same way, Toward Center aims them at the area's center. They steer on their own right after. |
| Off-Screen Spawning | Optional rule that resamples positions until they sit outside the visible camera area. |
Warning
If a director references a shape spawner and that spawner has Auto Spawn enabled, both will spawn agents on Start. The spawner inspector flags this. Disable Auto Spawn on the spawner to make the director the sole owner.
Common patterns¶
| Pattern | How |
|---|---|
| Single-burst encounter | One shape spawner, Auto Spawn on, Auto Spawn Count set. No director needed. |
| Waves entering from one edge | Rect Spawner aligned to a level edge, driven by a director in Continuous mode. |
| Off-screen ambush around the player | Ring Spawner with Follow Target set to the player, Off-Screen Spawning on, driven by a director or triggered from script. |
Related¶
- Spawners overview
- Swarm Spawner Director — drives shape spawners with full encounter logic.
- Swarm Agent Archetype — what each spawner references.