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

RaceSpawner

Method
Description

Spawn

Instantiates the game objects from the provided player and AI vehicle prefabs and spawn settings.

Property
Desctiption

SpawnCondition

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

BeginCountdownAfterSpawn | bool

If true, if the RaceManager's property "RaceStartCondition' is set to "AfterExternalCall", will call its "BeginCountdown" method.

SpawnPlayer | bool

Defines whether to spawn the player

UniqueOnly | bool

If set to true, only 1 instance from every prefab from the RacerAIVehiclePrefabArray will be spawned. If the length of this array is greater than Rows * Columns, the spawning will stop.

RandomizePlayerPos | bool

If true, player's position index will be randomized.

PlayerPosIndex | int

if RandomizePlayerPos is false, the selected index will be the player's start position.

PlayerVehiclePrefab | GameObject

Prefab with the Player's vehicle.

RacerAIVehiclePrefabArray | GameObject[]

Prefab array with vehicles that use AI Brain.

Rows | int

The amount of rows in a spawning grid.

Columns | int

The amount of columns in a spawning grid.

HorizontalDistanceBetweenSpawnPoints | float

The horizontal distance between the spawning positions.

VerticalDistanceBetweenSpawnPoints | float

The vertical (meaning in 2d space) distance between the spawning positions.

PreviousRacerProgressNextCollisionHandler

Last updated 1 year ago