Use SpawnerProxy when you want a scene prefab to spawn AI characters in waves. The proxy copies its settings into an ArenaSpawner at runtime, so mod authors usually configure the proxy and a pair of ScriptableObject assets instead of adding ArenaSpawner manually.
SpawnerProxy to the scene prefab or spawner object.SpawnerCharacterPool asset.EquipmentsData entries to that character pool. Each entry describes one spawnable character loadout.SpawnerWavePool asset.SpawnerCharacterPool to each wave that should use it.SpawnerWavePool to SpawnerProxy.waves.SpawnerProxy.spawnPoints with one or more transforms in the scene.SpawnerProxySpawnerProxy is the component you place in the scene. On Start(), it creates or reuses ArenaSpawner and copies these fields:
| Field | What it does |
|---|---|
waves |
The SpawnerWavePool asset containing all wave definitions. |
currentWaveIndex |
Starting wave index. Usually keep this at 0. |
suspendSpawningInDaytime |
If enabled, wave spawning pauses during daytime and resumes at night. |
defaultSpawnCharacter |
Fallback EquipmentsData used when a wave has no characterPool or the pool is empty. |
spawnPoints |
Candidate spawn transforms. The spawner prefers points outside the camera frustum and not too close to the player. |
spawnPointFindNearbyFreeSpaceRange |
Radius used to nudge the final spawn position toward nearby free space. |
SpawnerCharacterPoolSpawnerCharacterPool is a ScriptableObject list of EquipmentsData entries:
characters: the actual candidate spawn entries.concats: optional other character pools to merge into this one.Each EquipmentsData entry can define:
characterId: which character prefab to spawn.SpawnerWavePoolSpawnerWavePool is a ScriptableObject list of SpawnerWave entries:
entries: the waves the spawner will run in order.concats: optional other wave pools to merge into this one.sinceDay: editor-side helper used when concatenating pools.Each SpawnerWave decides when a wave can start, how many characters it spawns, and which pool it pulls from.
Spawner characters are resolved from EquipmentsData.characterId.
For mod characters, use this format:
js:modId/characterName
Examples:
js:com.studio.cityraid/BossBrute
For built-in characters, use this format:
Characters/CharacterName
Examples:
Characters/Zombie Normal 1
Characters/Runner Zombie
Characters/Giant Zombie
Characters/Uniform Soldier
If a wave does not assign a characterPool, or the pool has no entries, the spawner falls back to SpawnerProxy.defaultSpawnCharacter.
The most-used wave fields come from SpawnerWave and are enforced in ArenaSpawner.RunWave.
| Field | Meaning | Runtime behavior |
|---|---|---|
characterPool |
Character pool used by this wave. | If set and non-empty, the spawner picks from characterPool.characters. Otherwise it uses defaultSpawnCharacter. |
spawnCount |
Total number of characters to create in this wave. | The wave loops this many times. |
pickMode |
How the wave selects entries from the pool. | Random picks randomly. OrderedRepeat walks the pool in order and repeats when needed. |
sinceDay |
Earliest game day this wave is allowed to start. | The wave waits until currentDay >= sinceDay. Earlier waves can still run on later days. |
maxAlive |
Global alive gate before the wave is allowed to begin. | The wave will not start until current alive count is below this value. |
delay |
Delay after the wave becomes eligible. | The spawner waits this long before starting individual spawns for the wave. |
spawnInterval |
Delay between each individual spawn in this wave. | Applied after each spawned character. |
spawnMaxAlive |
Per-wave alive cap during spawning. | If alive count reaches this value, the wave pauses until enough spawned enemies die. |
blocking |
Whether the next wave must wait for this one to finish spawning. | If true, the next wave starts only after this wave completes its spawnCount. If false, later waves can overlap. |
subspawnPickRandomOrOrderedRepeat |
Legacy inspector bool mirrored into pickMode. |
true becomes Random, false becomes OrderedRepeat during validation. |
A typical mod setup looks like this:
SpawnerCharacterPool asset named for example ZombiePool.js:com.studio.zombie/ZombiePolicejs:com.studio.zombie/ZombieWorkerCharacters/Runner ZombieSpawnerWavePool asset.spawnCount=4, spawnInterval=1.5, spawnMaxAlive=2, characterPool=ZombiePoolspawnCount=8, spawnInterval=0.8, spawnMaxAlive=4, maxAlive=1, delay=5SpawnerProxy to your scene prefab, assign the wave pool, and set multiple spawn point transforms around the map.spawnPoints should contain at least one transform. If none are assigned, the spawner falls back to its own transform.FindFreeSpace, so the final position can move slightly away from the spawn point.suspendSpawningInDaytime is enabled, a wave can be mid-progress and still pause until night before continuing.blocking=false is useful for overlapping waves, but it also makes pacing harder to reason about. Start with blocking waves unless you need layered encounters.