RaceSpawner

MethodDescription

Spawn

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

PropertyDesctiption

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.

Last updated