The Sample Scenes

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.

Last updated