Getting Started

Install the Runtime Spawner package from Unity’s Package manager (go to ‘My Assets’, and find Runtime Spawner in the list.

Runtime Spawner is installed as a UPM package in your projects local /Packages folder. Once installed, you will find it in your project under the /Packages folder.

Note: If this is your first time installing Runtime Navmesh Spawner, it is recommended that you install the Samples to get a feel for how the package is used.

Installing Samples

In order to install the samples, open the Package Manager window and find the Runtime Spawner in the list of packages in your project. Select the ‘Samples’ tab and then click ‘Import’ beside the Runtime Spawner Sample, as shown in the image below:

This will install the samples into your project under the ‘Samples’ folder similar to what is shown below. (The exact folder structure and contents may change if a new version of the Runtime Spawner package is released):

The samples are organized into the following scenes:

  • Code - contains logic for the character controller, and several sample AI behaviour scripts (see Extras, below)

  • Content - contains materials for the player and AI characters as well as a Grid texture (created by Kenney.nl from his Prototype Textures pack)

  • GameData - sample SpawnEntry configurations for the AI characters

  • Prefabs - Prefabs for the Player, AI Characters and ground assets.

  • Scenes - the sample scene included in the package.

To get started, open one of the sample scenes included with the sample.

Text Mesh Pro Essentials

If you do not have the TextMesh Pro essentials in your project, Unity will prompt you to install them when opening the demo scene.

This is due to the fact that we have a simple UI in the demo scene. Click ‘Import TMP Essentials’ to add them to your project.

Core Concepts

The Runtime Spawner Package (com.pixelwizards.runtimespawner)

The core runtime spawner package includes the following components:

  1. Runtime Spawner component.

  2. Local Area Spawner component.

  3. Wave Trigger component

  4. Wave SpawnPoint component

And the following scriptable objects (used to configure the above components):

  1. Wave Spawner scriptable object

  2. Spawn Entry scriptable object

How it Works

The 2 most important pieces of the package are the Runtime Spawner component and the Spawn Entry scriptable object.

The Runtime Spawner controls all of the spawning logic, and the Spawn Entry scriptable object defines WHAT is being spawned (and rules about the spawned objects).

How you want objects to spawn in your game (global, local or wave) is configured via the Runtime Spawner inspector and all of the other elements can be created / managed directly from there.

The Object Pool Package (com.pixelwizards.objectpool)

The Object Pool package has no editor-facing functionality itself, but implements a clean interface for creating and managing reusable pools of objects for your games.

You can find the API documentation for the Object Pool package online here:

https://www.megacrush.app/api/object-pool/

Last updated