Custom Vehicle Controller
  • Custom Vehicle Controller
  • Guides
    • Workflow
      • Quick Setup
      • Creating New Parts
      • Modifying Parts
      • Creating Vehicle Parts Presets
      • Customizable Sets and Runtime Parts Change
      • Engine Performance Customization
      • Exposing Current Car Stats
    • API
      • CustomVehicleController
      • VehicleEngineSoundManager
      • RaceManager
      • RacerProgress
      • RaceSpawner
      • CollisionHandler
    • Vehicle Controller Input Provider
      • Input System Example
      • Mobile Input
    • Tips, Warnings and Requiremens
      • Work With Editor
      • Vehicle Set Up
    • AI Setup
      • AI Racer Creation
      • AI Racer Setup
      • AI Chaser Setup
      • Race Creation
      • Race Configuration
      • Race Information
    • Vehicle Damage System
      • Vehicle Damage Controller
      • Collision Area Partitioner
      • Part Damage Handler
      • Vehicle Attachments Aligner
      • Collision Handler
    • Additional Settings
      • Custom Vehicle Controller
      • Car Visuals Essentials
    • Package Settings
      • Assets Save Location
      • Project-Wide Surface Settings
    • Extra
      • Adding Visual Effects
        • Individual Effect Set Up
      • Adding Sound Effects
        • Adding Engine Sound
        • Adding Extra Sound Effects
  • Converting To Other Render Pipelines
    • Convert To Built-in RenderPipeline
    • Convert To HDRP RenderPipeline
Powered by GitBook
On this page
  1. Guides
  2. API

RaceManager

PreviousVehicleEngineSoundManagerNextRacerProgress

Last updated 1 year ago

RaceManager is a singleton, so you can access it's properties with RaceManager.Instance

Method
Description

GetLeaderboard()

Returns a sorted (ordered by the progress counting the number of laps finished) List of type "".

BeginCountdown()

If the "RaceStartCondition" is set to "After External Call", starts the countdown.

ResetRaceData()

Resets the race data.

Property
Description

StartCountdownTimeLeft | float

The amount of seconds left before a race will start.

StartCountdownTime | float

The amount of seconds that must pass before a race will start.

WaitForOtherRacersTimeLeft | float

The amount of seconds left after the podium places have been taken before a race will end.

WaitForOtherRacersTime

The amount of seconds that must pass after the podium places have been taken before a race will end.

FinishedRacersAmount

The amount of racers that have finished the race.

LapCount

The amount of laps of this race

RaceStartCondition

Possible values: InStartMethod, AfterExternalCall. If "AfterExternalCall" is selected, you need to call the "BeginCountdown" method

RaceEndNormilizedTime

The percent of the spline the racer must follow to finish the lap / the race (if there is only 1 lap)

PodiumPlaces

The amount of places that must be taken after which the race will start the WaitForOtherRacersTime countdown, after which the race will end

Instance

Singleton instance of the RaceManager.

RacerProgress