<aside> <img src="/icons/reorder_gray.svg" alt="/icons/reorder_gray.svg" width="40px" />

Navigation

</aside>

🏠 Home Page

Getting Started

Architecture

Level System

Characters & Vehicles

Run Mechanics

World Objects

Boosters & Modifiers

Progression & Economy

UI

Save & Debugging

Modules

Publishing

Reference

💰 Monetization (Ads & IAP)

<aside> 💡 A Level is a ScriptableObject that links a level scene, a Character, an optional LevelSetup and a music track. The Levels Database lists all levels in play order.

</aside>

Subsystems

level-asset.png

Level fields

Field Description
Id Unique id generated by the UniqueID drawer. Save data of the level (collected pickups, record distance) is stored under this id.
Scene The level scene. Use the scene asset picker. The scene name and path are saved as text, so the link works in builds.
Character The Character asset that provides the vehicle prefab, the run camera and three upgrades. Required.
Setup Override Optional LevelSetup. When empty, the level uses Default Level Setup from Game Data.
Music Optional audio clip. When empty, the global music track is used.

The Level exposes Level.Upgrades (the upgrades of its Character) and Level.Setup (the override or the default setup).

Levels Database

The order of the Levels array is the play order:

LevelsDatabase provides helper methods:

Method Use
GetLevelByIndex(int) Returns the level at the index. Returns the first level when the index is outside the array.
IsLevelExists(int) Checks that the index is inside the array.
GetLevelIndexById(string) Finds a level by its id. Returns -1 when the id is missing, for example when the level was removed.
GetLevelIndexByName(string) Finds the level that uses a scene name. Used by the Editor start override.

A saved level id that no longer exists in the database is ignored and GameController falls back to the Level Index field.

Level Picker

The Level Index field of GameController uses the [LevelPicker] attribute. It draws the integer as a dropdown with the entries #N - SceneName from the Levels Database. Use the same attribute on your own int fields to select a level.

[LevelPicker]
[SerializeField] int levelIndex;

Levels in the template

Level Scene Character Setup
Level 1 Level Character (Level 1) Default Level Setup: slingshot with drag input.
Level 2 Level 2 Character (Level 2) Car Level Setup: car slingshot with drag input.
Level 3 Level 3 Character (Level 3) No override, uses Default Level Setup.
Level 4 Level 4 Character (Level 4) Plane Level Setup: timing input and a launch ramp.

Level assets are stored in Assets/Project Files/Data/Progression/Level N, together with the Character asset and the upgrade assets of that level.

Id of a duplicated Level

The Id field has three buttons: lock, reset and copy. When a Level asset is duplicated, the copy keeps the id of the original. Two levels with the same id share the collected pickups and the record distance. Click the reset button next to the Id field of the copy and confirm to generate a new id.

Build Settings check

Before a build, LevelScenesBuildCheck compares the scenes of all levels with the Build Settings. When a scene is missing or disabled, a dialog offers three options:

In batch mode the check logs a warning.