Introduction
Introduction
The Runtime Spawner is a flexible, component-based system for controlling how enemies, NPCs, or objects are spawned dynamically during gameplay.
It is designed for both non-programmers who need quick, configurable encounters, and advanced designers who want deeper control over pacing, intensity, and world simulation — all without writing custom spawn scripts.
What Problem Does It Solve?
In most projects, spawning systems are tightly coupled to gameplay scripts or mission logic. That makes them brittle, hard to tune, and difficult to reuse across levels.
Runtime Spawner decouples what is spawned from when and why it spawns by providing:
Data-driven spawn definitions editable directly in the Inspector.
Layered systems for intensity, special encounters, and telemetry-based rules.
Consistent behavior across single-player, co-op, and networked game modes.
The result is a reusable, deterministic spawning pipeline that can scale from small ambient scenes to large, procedural worlds.
Key Features
Core Spawner
Handles queues, budgets, and lifecycle control for global, regional, and wave-based spawning.
Spawn Director & Intensity Profiles
Define pacing curves and difficulty steps that dynamically adjust density and composition.
Special Encounters
Rule-driven “special” spawns (bosses, elites, events) gated by step, cooldown, or live telemetry (pressure/health).
Spawn Hints System
Place authored hint points in the world to control where spawns appear — with LOS checks, distance filters, and NavMesh projection.
NavMesh Placement Policies
Per-entry control for Require, Prefer, or Ignore NavMesh availability, with deferred retries for dynamic surfaces.
Deterministic Seeding
Ensures reproducible spawn layouts from a single seed — ideal for testing or synchronized sessions.
Factory System & Object Pooling
Integrates with pooling for zero-GC instantiation, and supports both offline and networked object factories.
Networking Integrations
Optional adapters for Photon Fusion and Photon PUN 2+, including factory assets and sample bootstraps.
Designer-Friendly Inspectors
Grouped headers, inline help tips, and runtime controls for debugging and live tuning.
Extensible Architecture
Replace or subclass factories, executors, and telemetry providers to integrate with your own systems.
Example Use Cases
Ambient wildlife or pedestrian population systems.
Horde shooters or wave-based survival modes.
Dynamic open-world encounters that scale with player intensity.
Narrative missions with step-based progression or special triggers.
Co-op sessions where the host drives synchronized spawning for all clients.
Workflow Overview
Create a Runtime Spawner in your scene.
Define Spawn Entries — specify prefabs, weights, tags, and NavMesh policies.
(Optional) Attach a Spawn Director with an Intensity Profile to scale difficulty over time.
(Optional) Assign a Special Encounter Manager with a Special Profile for boss-like or conditional spawns.
(Optional) Enable Spawn Hints to steer placement toward authored points.
Press Play — the system will evaluate conditions, advance progression, and spawn objects automatically.
Beyond the Basics
For advanced workflows, the Runtime Spawner also supports:
Telemetry-driven encounters – spawn logic that reacts to player health or pressure metrics.
Networking factories – using Fusion or PUN to synchronize pooled objects in multiplayer.
Custom object factories – plug in your own pooling or ECS systems via the
IObjectFactoryinterface.Debugging & diagnostics – runtime panels, HUD readouts, and editor-side visualization tools.
In Short
The Runtime Spawner turns spawning into a data-driven, designer-friendly workflow — scalable, extensible, and ready for both offline and networked gameplay.
Last updated