# Samples Overview

Runtime Spawner includes a set of **focused sample scenes** demonstrating core systems, addon behaviors, and networking setups.

Each sample is designed to be **self-contained**, with a dedicated readme explaining setup and usage.

***

### Base Samples

These are the recommended starting point for all users.

#### Core

Provides all of the shared content used by the other samples. Required if you are installing / using the other samples.

Includes:

* Simple Environment
* Sample Characters and animations (from the Ambient City character packs)
* Shared Runtime Spawner configuration / setup used by the other samples.

{% hint style="info" %}
Note: the Core samples are required by all other samples, but it provides no demo scenes in and of itself.
{% endhint %}

#### Global

Demonstrates **persistent world population spawning**.

Includes:

* Continuous spawning logic
* Population limits and balancing
* Ambient-style spawning behavior
* Spawn Director demonstration scenes / configuration.

Use this to:

* Build open-world or background population systems

#### Local Area

Demonstrates **region-based spawning tied to player presence**.

Includes:

* Trigger-driven activation
* Enter/exit-based population control
* Localized encounter zones

Use this to:

* Create combat spaces, rooms, or proximity-based encounters

#### Waves

Demonstrates **structured, timed spawning patterns**.

Includes:

* Wave definitions and looping behavior
* Spawn timing and pacing control
* Integration with the Spawn Director

Use this to:

* Build survival modes or scripted combat encounters

#### Spawnpoints

Demonstrates **authored spawn point workflows**.

Includes:

* Explicit spawn locations
* Category-based matching between entries and points
* Deterministic placement

Use this to:

* Create ambushes, controlled entrances, or precise encounter setups

### Networking Samples

These samples demonstrate how Runtime Spawner integrates with multiplayer backends.

> Note: Networking samples require the corresponding core networking package to be installed.

#### PUN Core

Demonstrates **basic integration with Photon PUN** using the Runtime Spawner.

Includes:

* PUN bootstrap setup (connect + room flow)
* Networked spawning via factory system
* Master Client authoritative spawning

Use this to:

* Understand how spawner execution is synchronized in PUN

#### PUN Local Area

Demonstrates **region-based spawning in a networked environment**.

Includes:

* Local Area Spawner with PUN drivers
* Replicated player presence
* Deterministic activation across clients

Use this to:

* Build multiplayer encounter zones

#### PUN Waves

Demonstrates **wave-based spawning with network synchronization**.

Includes:

* Wave triggers driven by network authority
* External activation mode for deterministic control
* Shared wave progression across clients

Use this to:

* Create synchronized multiplayer combat scenarios

#### Fusion Core

Demonstrates **basic integration with Photon Fusion (Shared Mode)**.

Includes:

* Fusion bootstrap and runner setup
* Networked factory and pooling integration
* Player spawning and synchronization

Use this to:

* Understand core Fusion setup with Runtime Spawner

#### Fusion Local Area

Demonstrates **region-based spawning using Fusion networking**.

Includes:

* Local Area Spawner with Fusion drivers
* Authority-driven activation
* Replicated player presence

Use this to:

* Build deterministic multiplayer encounter zones in Fusion

#### Fusion Waves

Demonstrates **wave spawning with Fusion synchronization**.

Includes:

* Network-driven wave triggers
* Shared progression across clients
* Authority-controlled spawning

Use this to:

* Implement synchronized wave-based gameplay in Fusion

### Sample Structure

All samples follow a consistent layout:

* **Scenes/** – Example scenes demonstrating specific systems
* **Prefabs/** – Player, AI, and environment prefabs
* **GameData/** – Spawn entries and configuration assets
* **Code/** – Supporting scripts and controllers
* **Content/** – Shared materials and prototype assets

### Recommended Learning Path

1. Start with **Core**
2. Explore **Global** or **Local Area**
3. Add **Waves** for structured encounters
4. Use **Spawnpoints** for authored placement
5. Move to **Networking samples** if needed


---

# 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/getting-started/samples-overview.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.
