UI Setup: RaceTowerUI
This guide walks through setting up the standings tower UI.
If you ran the Quick Start Wizard with Race Tower enabled, the prefab is already in your scene. This guide is useful if you want to rebuild it, tweak the layout, or troubleshoot.
What you need
- A
RaceTimingManagerin the scene - At least one
RaceCompetitor - A Canvas-based UI root
Option A (recommended): Use the prefab
- Find the prefab in the Project window:
Assets/SlowToastRacing/RaceTiming/UI/Prefabs/RaceTower.prefab- Drag it into your scene.
- Press Play.
Rows appear at runtime as competitors register and the session starts.
Option B: Build the UI manually
1) Create a Canvas
- GameObject → UI → Canvas
- Make sure the Canvas has:
CanvasCanvas Scaler(recommended: Scale With Screen Size)Graphic Raycaster
2) Create a row container
- Under the Canvas, add a panel or empty
RectTransform. - Name it
RaceTowerContainer. - Add these components:
Vertical Layout GroupContent Size Fitter(optional — set Vertical Fit to Preferred Size)
Recommended Vertical Layout Group settings:
- Child Alignment: Upper Left
- Spacing: 2–8
- Control Child Size: enabled (at least Width)
3) Create a row prefab
You need a prefab with a RaceTowerRowUI component.
- Under the container, create a panel (GameObject → UI → Panel) and name it
RaceTowerRow. - Add text fields using
TextMeshProUGUI. Minimum setup: PositionTextNameTextGapText
Optional fields supported by RaceTowerRowUI:
- LapText (shows L X)
- RatioText (debug ratio)
- TeamColorStrip (an Image for team colour)
- Add the
RaceTowerRowUIcomponent. - Assign the text and image references in the Inspector.
- Drag the
RaceTowerRowobject from the Hierarchy into the Project window to create a prefab. - Delete the temporary in-scene instance (optional).
4) Add RaceTowerUI
- Select the Canvas (or another suitable UI object).
- Add the
RaceTowerUIcomponent. - Assign:
RowPrefab: the prefab you just createdContainer: yourRaceTowerContainertransform- Set
Mode(default:GapOnTrack):
| Mode | Description |
|---|---|
GapToLeader |
Gap to P1. Classic standings format. |
GapToAhead |
Interval to the car directly ahead. |
GapOnTrack |
Track-based intervals relative to a reference driver. |
GapToBestLap |
Gap to the session's best lap. Best for qualifying. |
For
GapOnTrack, setReferenceDriverId = -1to automatically use the leader as reference.
Common issues
Nothing appears
RowPrefabnot assignedContainernot assignedRaceTimingManagermissing or session not started
Rows appear but data looks wrong
- Competitors show
---until they cross the start line (by design) - Track length may be 0 if
TrackMarkerManagerBehaviourcan't be found
UI stacks or overlaps incorrectly
- Ensure the container has a
Vertical Layout Group - Ensure the row prefab has a consistent height or a
LayoutElement
Screenshots
1. Prefab Hierarchy
(Shows the hierarchy when using the wizard or the provided prefab. Row clones appear under RaceTowerPanel at runtime.)

2. RaceTowerUI Inspector

3. In-Game
