Megacrush Unity Assets
Runtime Spawner User Manual
Runtime Spawner User Manual
  • Runtime Spawner User Manual
    • Introduction
      • The Welcome Dialog
      • Core Concepts
    • Technical Details
    • Getting Started
      • Samples Overview
      • The Sample Scenes
      • SRP Support
    • Components
      • Runtime Spawner
      • Local Area Spawner
      • Wave Trigger
    • Scriptable Objects
      • Spawn Entry
      • Wave Spawner
    • Runtime Spawner Settings
    • Runtime Spawner API
    • Extras
Powered by GitBook
On this page
  • Global Spawner
  • Local Area Spawner (Biome)
  • Wave Spawner
  • Combined Example
  • API Example - Manual Start
  1. Runtime Spawner User Manual
  2. Getting Started

The Sample Scenes

PreviousSamples OverviewNextSRP Support

Last updated 1 year ago

There are a number of different sample scenes included with the Runtime Spawner Samples. Each demonstrates a single use case and the ‘Combined Example’ showcases how these various options can be used together in a more complicated example.

If any of the scenes does not look like the screenshots below, you might be using one of Unity’s Scriptable Render Pipelines (URP or HDRP) in your project. See the ‘SRP Support for Samples’ section, below for instructions on how to convert the samples to your chosen render pipeline.

Press Play in the Editor to view the sample.

You can control the character using the WASD keys and the camera by using the Mouse.

Global Spawner

This is a simple example of spawning global AI objects anywhere on the navmesh in the scene.

Local Area Spawner (Biome)

This example showcases how to use the Local Area Spawner to only spawn AI Objects when the player enters a specific trigger volume within the scene.

The “New Spawn Region’ game object defines the spawning area and Spawn Entries to use.

Wave Spawner

This scene provides an example of a tower defense style ‘wave’ spawning system. The waves are triggered when the player enters the green ‘Wave Trigger’ and continue until completed.

The waves are triggered when the player enters the green ‘wave trigger’ and continue until completed.

The Wave Trigger defines a number of Wave Spawn Points which indicate where the AI Agents are spawned.

The waves themselves are defined in the Wave Spawner scriptable object, which specifies how many AI Agents to spawn, their frequency and which Spawn Entries to actually spawn.

Combined Example

This example combines all of the first 3 examples into a single master scene. Global AI Agents are spawned anywhere on the navmesh, Local Area spawners are spawned when the player enters the Local Area Spawner zone and Waves are spawned if the player enters the Wave Trigger zone.

API Example - Manual Start

This final example has a simple demonstration of using the Runtime Spawner public API. The StartRuntimeSpawner.cs script shows how to use the public API.

The 1. Global Spawner Sample Scene
Screenshot of the 1. Global Spawner demo scene open in the editor
Screenshot of the 2. Local Area Spawner (Bioms) sample scene
The 3. Wave Spawner sample scene
The 4. Combined Example scene
the 5. Manual Start sample scene