# Runner (Template)

Starter asset to create your runner game based on these various templates!

{% embed url="<https://youtu.be/6BF9zQ7p5y8>" %}

## <mark style="color:red;">Runner Temps Structure</mark>

### <mark style="color:yellow;">1- MOST Systems</mark>

**As this asset is part of** [**MOST IN ONE**](https://assetstore.unity.com/packages/slug/295013)**, it has some MOST Systems**

Check the documentation for each system for more details<br>

**🔹** [**MOST\_Action**](https://solo-player.gitbook.io/most-in-one/~/revisions/i8h4cfv1XBoWpH8Tl62S/most-actions) **🔥🔥🔥🔥🔥🔥🔥**

works as a manager to a collection of actions like particles, transform animations, sound effects, materials tweaks, camera control, and a lot more

**🔹** [**MOST\_Editor**](https://solo-player.gitbook.io/most-in-one/~/revisions/i8h4cfv1XBoWpH8Tl62S/most-editor) **🔥🔥🔥🔥🔥🔥🔥**

A plug-and-play Unity editor bundle of attributes, drawers, and utility structs that supercharge inspectors—no custom editor boilerplate needed.\
It adds styled headers/lines, conditional show/disable, required & hints, GUI tinting, help boxes, foldout grouping, and a lot more

**🔹** [**MOST\_Database**](https://solo-player.gitbook.io/most-in-one/~/revisions/i8h4cfv1XBoWpH8Tl62S/most-database) **🔥🔥🔥🔥🔥🔥🔥**

TO Create/Store/Save/Load all of the game keys and data like currencies, current level, scores(current/best), IAP, etc.

**🔹** [**MOST\_AudioManager**](https://app.gitbook.com/o/NpEOoRNmudPcwXGWJxMW/s/XVjqyL2Am4WC7AkXSTxy/universal-game-settings)

Audio controller that targets Unity’s AudioMixer: manages 4 ready-to-go groups (Master/Music/SFX/UI), with a UI-support listeners

**🔹** [**MOST Damage**](/most-in-one/most-systems/most-damage.md)\
A modular health and damage system with support for layer/tag filtering, health bars, damage/heal popups, effect triggers, and event hooks (On Heal, On Take Damage, On Defeat).

🔹 [**MOST Gate**](/most-in-one/most-systems/most-gate.md)\
A configurable gate system with input/output logic (math/custom), automatic text labeling (positive, negative, or empty), animations, and a customizable output hook.

🔹 [**MOST Road**](/most-in-one/most-systems/most-road-move.md)\
A touch-friendly straight-road movement system with smooth control, rotation direction support, camera follow, and road-bound constraints.

🔹 [**MOST Spawn**](https://solo-player.gitbook.io/most-in-one/most-systems/most-spawn)

The ultimate solution for object generation. Use it to spawn enemies, set GameObject positions on Awake, generate points, create patterns, and much more. Includes a powerful debug system to visualize spawn areas and points.

🔹 **MOST Gradient (Shader)**\
A two-color gradient shader (including transparency), easy to configure and perfect for world-space effects and stylized visuals.

### <mark style="color:yellow;">2- Game Settings</mark>

All templates share the new MOST IN ONE [<mark style="color:red;">**Universal Game Manager**</mark>](/most-in-one/general/universal-game-settings.md)<mark style="color:red;">**...**</mark>

<mark style="color:$info;">**Universal is...**</mark>

<mark style="color:green;">Audio Manager</mark> + <mark style="color:yellow;">Level Manager</mark> + <mark style="color:red;">UI Menu Manager</mark> + <mark style="color:$danger;">Game Events Manager</mark>

{% hint style="info" %}
For MOST Runner Templates >> Universal Game manager documentation will be dropped soon + the update of this documentation as it is a part of MOST IN ONE v3.0.0
{% endhint %}

<figure><img src="/files/JAgkSIdVKuMazGAl2LKR" alt=""><figcaption></figcaption></figure>

### <mark style="color:yellow;">3- Character Control</mark>

Each character has its own settings and the script build, all share the same movement system, base prefab build.

There are 4 Character control systems (Epic Road and Epic Runner have the same character)

1. Character Control\_Count
2. Character Control\_BigBrain
3. Character Control\_Pistol
4. CharacterControl\_ShootRunner

## Templates

### <mark style="color:yellow;">1- Epic Runner</mark>

<figure><img src="/files/fHCPwAqxyHZzbdWIqZ5V" alt="" width="375"><figcaption></figcaption></figure>

### <mark style="color:yellow;">2- Epic Road</mark>

<figure><img src="/files/pkjYII9gpJFpT3NB9tSU" alt="" width="375"><figcaption></figcaption></figure>

### <mark style="color:yellow;">3- Pistol</mark>

<figure><img src="/files/0bbU93WjuTvIFBUmNcP5" alt="" width="375"><figcaption></figcaption></figure>

### <mark style="color:yellow;">4- Count</mark>

<figure><img src="/files/I1FqliA3XJ1LYIuziOvw" alt="" width="375"><figcaption></figcaption></figure>

### <mark style="color:yellow;">5- Big Brain</mark>

<figure><img src="/files/knMED6KOQRosngC8fUYc" alt="" width="375"><figcaption></figcaption></figure>

## <mark style="color:red;">**Level Generator**</mark>

To open the Runner Level Generator window

Tools > Runner Level Generator

<figure><img src="/files/k3YMYiC3YxA21LpSMc66" alt=""><figcaption></figcaption></figure>

***

### <mark style="color:yellow;">**1**</mark><mark style="color:yellow;">)</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**Profile Assets**</mark>

are **ScriptableObject assets** that store all settings, including prefab references.\
In the window header:

* From the window, drag an existing profile or pick from the object field. Changing it auto-loads.
* **New**: create a profile `.asset` and seed it with the current window state.
* **Save**: write the current window state back to the selected profile.
* **Load ▾**: quick menu listing all `RunnerLevelProfile` assets in your project.

> The last selected profile is remembered. Renaming/moving assets within `Assets/` is safe—Unity keeps references stable.

{% hint style="info" %}
There are 3 ways to create a new Profile Asset

1- Use the "New" button inside the Runner Level Generator Window

2- From the asset folder, Right-click > Create > MOST > Runner Level Profile

3- Duplicate an already-existing Runner Level Profile
{% endhint %}

{% hint style="danger" %}
MAKE SURE to tap Save after you finish your edits on the Profile.
{% endhint %}

***

### <mark style="color:yellow;">**2**</mark><mark style="color:yellow;">)</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**Save Section**</mark>

* **Save As Prefab**: if enabled, the generated GameObject is also saved as a prefab.
* **Save Folder**: Unity path (e.g., `Assets/Levels`).
* **Base Name**: e.g., `Level` → auto saves as `Level #1.prefab`, `Level #2.prefab`, etc.
* The **Auto name preview** shows the next number.

> If **Save As Prefab** is off, the tool still builds the level in the open scene (no prefab saved).

***

### <mark style="color:yellow;">3) Layout</mark>

<figure><img src="/files/JqpXHiw0NpzH5TXfPaWr" alt=""><figcaption></figcaption></figure>

* **Start Position**: world origin where generation begins.
* **Road Prefab** *(optional)*: the repeated segment. If empty, road is skipped.
* **Repeat Times**: number of road segments.
* **Offset Between Parts**: applied per segment (e.g., `(0,0,10)` for 10m spacing).

***

### <mark style="color:yellow;">4) Endgame</mark>

<figure><img src="/files/PUln4pJvVfR7JOhaFfYu" alt=""><figcaption></figcaption></figure>

* **Endline Prefab** *(optional)*: final marker. If empty, endline is skipped.
* **Offset From Start**: where to put the endline relative to Start.
* **Have Bonus**: enables the bonus section logic.

> **Length fallback when Endline is missing**\
> If Endline Prefab is empty, the system uses **Endgame.OffsetFromStart** to define track length.\
> If that is (effectively) zero, it falls back to `RepeatTimes × OffsetBetweenParts`.

***

### <mark style="color:yellow;">5) Bonus Repeater</mark>

{% hint style="info" %}
Shown only when **Have Bonus** is on.
{% endhint %}

#### Common settings

* **Repeated Prefab** *(optional)*: step prefab. If empty, bonus is skipped.
* **Amount**: how many steps to spawn.
* **Offset per Step**: distance between steps.
* **Offset From Endpoint**: position offset relative to the endline (or fallback endpoint).

#### Gate Mode (Is a Gate = on)

* **Is a Gate**: when enabled, the tool writes text values to all `MOST_Gate` components found anywhere under each spawned step (children included).
* **GateText / OutputText progression**:
  * **Start** + **Jump** values (floats) increment per step.
  * **Signs** (`GateSign`, `OutputSign`) determine text prefix; **+** won’t be added in front of negatives.
* Each step updates **every** `MOST_Gate` under that step.

#### Legacy Mode (Is a Gate = off)

* **Legacy TMP Text (xN)**: shows xN values on configured TMP children:
  * **Start** + **Jump** control `x<value>` per step (e.g., `x1.0`, `x1.2`, `x1.4`).
* **Text Names in Step Children**: list of child paths that contain `TMP_Text`.
* **Colored loop (Legacy)**: optional target path + materials; loops index with step.

{% hint style="success" %}
This section is the replacement of [MOST\_Repeat](broken://pages/rTh6RFuYTPRZK2bQlDSL) system
{% endhint %}

***

### <mark style="color:yellow;">6) Level Objects (Parts)</mark>

<figure><img src="/files/3aPus3XwYj16KDLAYsaR" alt=""><figcaption></figcaption></figure>

* **Offset From Start (Z)** / **Offset Before Endline (Z)**: define the Z window in which objects spawn.
* **Step Z**: base spacing (per row) along Z.
* **Step Y**: per-row change in Y (0 means single Y row).
* **Road Width**: used to compute lateral lane positions.

<mark style="color:$primary;">**Part properties**</mark>

Each **Part** is one candidate object the system may spawn on a row.

* **Name** (label), **Prefab** *(required)*.
* **Road Separation**: 1, 2, or 3 lanes.

  by summing the **Chance** of all parts in each separation, and sampling across the summed weights.

  * Example: if 1-lane total = 5, 2-lane total = 12, 3-lane total = 3 → row chooses `Separation 2` \~60% of the time.
  * 1 lane: `x = 0`
  * 2 lanes: `x = ± (RoadWidth * 0.25)`
  * 3 lanes: `x = - (RoadWidth * 0.25), 0, + (RoadWidth * 0.25)`
* **Extra Step Z**: a delta added to the global Step Z **for rows that choose this part**.\
  Each row’s Z is at the **midpoint** of its step (anchor + step \* 0.5), ensuring evenly centered spacing.
* **Chance**: relative weight for selecting the part (see selection algorithm below).
* **Spawn Offset**: per-object positional offset added after lane placement.

**Gate (optional) on a Part**

* **Is a Gate (MOST\_Gate)**: enables gate text assignment for objects spawned from this part.
* **Gate Presets** *(min 1)*: each preset =\
  **Sign**, **Range Min/Max**, **Step**, **No Zero**
  * At spawn time, the system picks **one preset per `MOST_Gate`** (per component!) and then picks a stepped value.
  * Assigns **GateText** as `Sign + value` (with “+” suppressed for negatives).
* **Update Output Text**: enable Output writing
  * **Output Sign**
  * **Out Min/Max**, **Out Step**, **Out No Zero**
  * Output value selection is **separate** from Gate and also per `MOST_Gate`.

> **Multiple MOST\_Gate components** under the same spawned object are handled **independently**. Each gate component gets its **own preset** and stepped pick so results won’t be uniform.\
> \
> The tool searches **all children** (including inactive) under a spawned instance.\
> No hard assembly dependency: it looks by type name `"MOST_Gate"`.

Important tips I only see it as FAQ :smile:

<mark style="color:red;">**Q: Can I generate without roads/endline/bonus?**</mark>\ <mark style="color:$info;">**A: Yes—any of those can be empty and the system continues.**</mark>

<mark style="color:red;">**Q: And parts with missing prefabs?**</mark>\ <mark style="color:$info;">**Any selected Part with a missing prefab → that lane is skipped; other lanes still spawn.**</mark>

<mark style="color:red;">**Q:**</mark> <mark style="color:red;"></mark><mark style="color:red;">Will gate texts ever show</mark> <mark style="color:red;"></mark><mark style="color:red;">`"+-10"`</mark><mark style="color:red;">?</mark>\ <mark style="color:$info;">**A: No—“+” is not prepended for negative values.**</mark>

<mark style="color:red;">**Q: Can I ensure a part always takes the center lane? (Important one)**</mark>\ <mark style="color:$info;">**A: By default, the part-to-lane mapping is unbiased (you can add a one-line shuffle of the selected list if needed). To force a lane, create distinct parts per lane and control their Spawn Offset and Chance accordingly.**</mark>

{% hint style="info" %}
BigBrain profile is the best showcase for that... Check the spawn parts (you will see Left/right lanes)
{% endhint %}

<mark style="color:red;">**Q: Do profiles include everything?**</mark>\ <mark style="color:$info;">**A: Yes—all window settings (including prefab references) are serialized into the**</mark><mark style="color:$info;">**&#x20;**</mark><mark style="color:$info;">**`.asset`**</mark><mark style="color:$info;">**&#x20;**</mark><mark style="color:$info;">**profile.**</mark>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://solo-player.gitbook.io/most-in-one/general/runner-template.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
