Spawn Entry
Spawn Entry
A simple scriptable object that provides configuration for the actual object being spawned.
You can create a new Spawn Entry by right clicking any folder in the Project Window and going to Create ⇒ Runtime Spawner ⇒ Spawn Entry
Or by using the Asset Menu (Assets ⇒ Create ⇒ Runtime Spawner ⇒ Spawn Entry)

Properties
Prefab
This defines the Prefab that will be spawned. Save a prefab of your AI Agent into the project window and drag / drop it into this field.
Max Population
The max number of this AI Agent that can be present in the world at once.
Use Group Spawn
This property is used by the Global and Local Area Spawners to determine whether we should spawn this Spawn Entry type in ‘Groups’. What this means in practice is that once one AI Agent is spawned of this type, a random number of additional AI Agents will be spawned ‘nearby’, using the first AI Agent’s position and calculating an offset.
NavMesh Placement Policy (new as of 1.3.0)
Tell the spawner how strictly this entry should obey the NavMesh when choosing a spawn position. This controls whether the spawn is projected onto the NavMesh immediately, deferred until a NavMesh exists, or placed without using the NavMesh at all.
Modes
Require Only spawn if a valid NavMesh position is found. If the mesh isn’t ready (e.g., streaming/baking), the request is deferred and retried automatically with backoff until success or retry limit is hit.
Prefer Spawn now at the chosen position. If a
NavMeshAgent
is present, it stays disabled until a valid NavMesh appears; a helper will enable the agent once projection succeeds (no despawn/respawn needed).Ignore Place the object without using the NavMesh. Use this for entities that don’t rely on NavMesh (flying drones, props, effects) or for authored placements where NavMesh alignment isn’t required.
Properties (shown when Policy ≠ Ignore)
Search Radius (
navmeshSearchRadius
) Max distance forNavMesh.SamplePosition
from the candidate position.Area Mask (
navmeshAreaMask
) Bitmask of allowed NavMesh areas. Leave as All Areas unless you need to constrain to “Walkable”, “Jump”, etc.Max Attempts (
navmeshMaxAttempts
) How many sampling jitters to try per placement attempt.Jitter (
navmeshJitter
) Random offset (meters) applied between attempts to escape tight spots.Max Deferred Retries (
maxDeferredRetries
) (Require only) How many times the spawner will re-attempt after deferring because no NavMesh was available. Retries use exponential backoff.
How it behaves at runtime
Global / Region / Wave spawns all respect the chosen policy.
Require: if projection fails now, the spawner queues a deferred job; once a valid point is found, the pooled instance is spawned normally.
Prefer: instance is spawned immediately; a
NavMeshReadyEnabler
component (auto-added if needed) keeps theNavMeshAgent
disabled and flips it on when a valid NavMesh point becomes available.Ignore: no projection; your prefab is placed and activated as-is.
When to use what
Use Require for grounded AI that must never appear off-mesh (walkers, melee enemies).
Use Prefer when you want instant presence but can tolerate delayed navigation (streaming meshes, dynamic build).
Use Ignore for non-NavMesh actors (fliers, turrets, VFX) or custom locomotion.
Tips
If using Spawn Hints, the hint’s
requireNavMesh
/overrideAreaMask
rules are respected during sampling.For streamed/baked-late meshes, consider Prefer if you want visible enemies right away, or Require if you prefer no spawn until the mesh is ready.
Troubleshooting
“Nothing spawns with Require”: your mesh may not be ready or area mask is too restrictive — increase Search Radius, loosen Area Mask, or raise Max Deferred Retries.
Agents never move with Prefer: ensure the scene eventually has a valid NavMesh under the spawn; the helper only enables when projection succeeds.
Last updated