Registering Enemies on a Level

When you click the "Add Enemy Spawn Point" button, a new block appears in the scene for configuring an enemy spawn point. You can specify the spawn zone type, enemy type, quantity, position on the spline, as well as events — when the enemies should spawn and when they should return to the object pool.

EnemyType — determines who will appear in the zone: Stickman or Tentacle.

PositionOnSpline — moves the ZoneType along the spline. Works only with Circle and Rect types.
SpawnTriggerPosition and DespawnTriggerPosition
They define the positions of the markers on the spline for taking objects from the pool and returning them back. Visually, there are two markers: blue and red.
When the player passes the blue marker, the specified number of enemies is taken from the pool.
When the player passes the red marker, the enemies return to the pool.
Place the markers so that the enemies’ appearance and disappearance are unnoticeable to the player.

Zone Type:
Circle — enemies spawn at a random position within the circle.


Zone Type: Rect — enemies spawn at a random position within the rectangle.


Zone Type: RectAlong — enemies spawn at a random position within a rectangular zone located along the spline.


StartRect and EndRect — they determine the positions of the spawn zone on the spline.
Number of Segments — parameter that determines the number of segments the zone is divided into. The higher the value, the more precisely the zone follows the shape of the spline and the smoother it appears.
Note: This parameter affects only the visual and geometric accuracy of the zone’s display. It does not affect the actual spawning process of objects.
Additionally: When the EnableSpawnGradient parameter is enabled, the number of segments also affects the detail of the zone’s gradient display — the more segments, the more precise the gradient visualization.
Rect width — the width of the zone. Affects spawning.
EnableSpawnGradient — spawn gradient enabled.
The EnableSpawnGradient parameter controls how enemies are distributed within the spawn zone:
If disabled — enemies spawn randomly throughout the entire zone.
If enabled — the spawn zone is divided into segments (gradient areas), each of which can have a specified number of enemies.
Note: For proper functioning, the Time sliders must be set accurately. Incorrect placement may result in improper spawning.

Color Keys — color segment parameters
Color Keys are a set of parameters that define a color segment along the spline and the number of enemies spawning in that segment. Each key contains:
Time — a value from 0 to 1 that defines the right boundary of the segment along the spline path.
Color — the color used for the visual representation of the segment, distinguishing it from others.
EnemyCount — the number of enemies that will spawn within this segment.
Note: Segments are processed sequentially from 0 to 1 based on the Time value.
Examples of settings




Adding environment elements
Environment elements are objects placed either manually or along a spline to create the visual design of a level: trees, rocks, decorations, etc. To place objects along a spline, you will need the SplineInstantiate script. For a quick introduction to working with splines in Unity, you can watch the following video: https://youtu.be/IJbH5OZa_is This tutorial covers the basics of creating and editing splines using Unity’s built-in tools.
Examples of level builds can be found here:
Assets/StaticAssets/Prefabs/Levels...
Level Finalization: Creating and Registering a Prefab
After placing and configuring all environment elements:
Create the level prefab
Select the root object of your level in the Hierarchy
Drag it into the folder:
Assets/StaticAssets/Prefabs/Levels/Make sure the structure and all internal references within the object are saved correctly
Register the level prefab in the LevelList config:

Without registering it in the config, the level will not be available for loading or playing.
Last updated