# Introduction

Runtime Spawner is a modular system for spawning enemies, NPCs, and objects dynamically at runtime.

It provides a **data-driven, designer-friendly workflow** for controlling:

* what gets spawned
* when it happens
* where it appears
* how it scales over time

***

### What Problem Does It Solve?

In many projects, spawning logic is:

* tightly coupled to gameplay scripts
* difficult to tune
* hard to reuse across levels

Runtime Spawner separates these concerns by introducing a **consistent spawning pipeline** that is:

* **data-driven** - configured through assets and inspectors
* **modular** - built from interchangeable systems (addons)
* **scalable** - works from small scenes to large worlds

***

### How It Works

Runtime Spawner is built from three main layers:

#### Core

Handles execution:

* spawning pipeline
* placement and validation
* population tracking
* pacing via the Spawn Director

***

#### Addons

Define behavior:

* Global (ambient population)
* Local Area (region-based encounters)
* Waves (structured spawning)
* Spawnpoints (authored placement)
* Special Encounters (conditional events)

***

#### Factories & Networking

Control instantiation:

* object pooling
* multiplayer synchronization (PUN / Fusion)

***

### Example Use Cases

* Ambient population systems (wildlife, pedestrians)
* Wave-based combat or survival modes
* Open-world encounters that scale over time
* Scripted missions with controlled pacing
* Multiplayer sessions with synchronized spawning

***

### Basic Workflow

1. Add a **Runtime Spawner** to your scene
2. Define **Spawn Entries** (what to spawn)
3. (Optional) Configure a **Spawn Director** (pacing)
4. Add one or more **addons** (behavior)
5. Press Play - spawning is handled automatically

***

### In Short

Runtime Spawner turns spawning into a **composable system**:

* Core executes
* Addons define behavior
* Data drives configuration

This makes it easy to build anything from simple ambient scenes to complex, scalable gameplay systems - in both single-player and multiplayer.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://megacrush.gitbook.io/megacrush-unity-assets/runtime-spawner/runtime-spawner-user-manual/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
