Skip to content

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 Rect Spawner inspector showing the Spawn Profile, Auto Spawn, and Spawn Area sections

The Rect Spawner inspector. Spawn Profile picks the archetype, Auto Spawn controls whether the spawner fills itself on Start, and Spawn Area sets the rectangle via Rect Extents. Press Edit Shape to drag the rectangle handles in the Scene view.

Scene view of a selected Rect Spawner showing its cyan rectangle gizmo marking the spawn area on the ground

With the spawner selected, the cyan rectangle marks the spawn area set by Rect Extents. Use Edit Shape in the inspector to drag its corner handles. Agents spawn at random points inside this rectangle.

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.

Swarm Ring Spawner inspector showing Spawn Radius, Spawn Width, Follow Target, and Agent Facing in the Spawn Area section

The Ring Spawner inspector. Spawn Radius and Spawn Width set the ring band, Follow Target keeps the area centered on a moving transform (assign the player for ambush rings), and Agent Facing defaults to Toward Center so agents close in on whatever the ring surrounds.

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.