UI Setup: RaceTowerUI
This guide walks through setting up the built-in standings tower UI in a clean, editor-friendly way.
If you ran Tools → Sirocco Race Timing → Quick Start Wizard, you may already have a RaceTowerUI prefab instance in your scene. This guide is still useful if you want to rebuild it, change visuals, or troubleshoot.
What you need
- A
RaceTimingManagerin the scene - At least one
RaceCompetitor - A track (recommended):
TrackMarkerManagerBehaviour+TrackMarkersSO - A Canvas-based UI root
Option A (recommended): Use the provided prefab
The Quick Start Wizard attempts to create the UI from a prefab if it exists.
- In the Project window, locate the prefab:
Assets/RaceTiming/UI/Prefabs/RaceTower.prefab- Drag it into your scene.
- Press Play.
If the prefab is present and wired correctly, you should see rows created at runtime as competitors register and the session runs.
Option B: Build the UI manually (step-by-step)
1) Create a Canvas
- GameObject → UI → Canvas
- Ensure the Canvas has:
CanvasCanvas Scaler(recommended: Scale With Screen Size)Graphic Raycaster
2) Create a container for rows
- Under the Canvas, create:
- GameObject → UI → Panel (or an empty
RectTransform) - Name it
RaceTowerContainer - Add:
Vertical Layout GroupContent Size Fitter(optional; typical settings: Vertical Fit = 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:
- GameObject → UI → Panel (name it
RaceTowerRow) - Add the text fields you want. Typical minimal setup (using
TextMeshProUGUI): TextMeshProUGUInamedPositionTextTextMeshProUGUInamedNameTextTextMeshProUGUInamedGapText
Optional fields supported by RaceTowerRowUI:
- LapText (shows L X)
- RatioText (debug-style ratio display)
- TeamColorStrip (an Image used for team color)
- Add component:
RaceTowerRowUI - Drag references in the Inspector:
PositionText,NameText,GapText,LapText,RatioTextTeamColorStripif present- Drag the
RaceTowerRowobject from Hierarchy into the Project window to create a prefab. - Delete the temporary in-scene row instance (optional).
4) Add RaceTowerUI
- Select the Canvas (or another suitable GameObject in your UI)
- Add component:
RaceTowerUI - Assign:
RowPrefab: the prefab you createdContainer: yourRaceTowerContainertransform- Choose
Mode: GapToLeader- Shows gap to the race leader (P1). Classic standings tower format.GapToAhead- Shows interval to the car directly ahead. Useful for close racing.GapOnTrack- Shows track-based intervals relative to a reference driver. Broadcast-style display.GapToBestLap- Shows gap to the session's best lap time. Useful for qualifying sessions.
Mode-specific settings:
- If using GapOnTrack, set ReferenceDriverId = -1 to automatically use the leader as reference.
- GapToBestLap is best suited for qualifying/practice sessions where lap times matter more than positions.
Common pitfalls
“Nothing appears”
RowPrefabis not assignedContaineris not assignedRaceTimingManageris missing orLapTimerisn’t running
Rows appear but data looks wrong
- Competitors may show
---until they have crossed the start line (by design) - Track length might be 0 if the manager can’t find the track markers
UI looks stacked / overlaps
- Ensure your container has a
Vertical Layout Group - Ensure your row prefab has a sensible
LayoutElementor consistent height
Screenshot / GIF placeholders (for later)
If you want to add images later, recommended captures:
1. Scene Hierarchy showing Canvas → Container → Rows
2. Inspector screenshot of RaceTowerUI with assignments
3. A running Game view with a few cars and the tower updating