Quantum 3 3.1.0

Classes | Public Member Functions | Public Attributes | List of all members
Quantum.QuantumRunnerLocalDebug Class Reference

A Unity script that starts a local Quantum simulation from a gameplay scene. Requires a QuantumMapData in the hierarchy. Player are automatically added to the game which can be listed in LocalPlayers. The script disables itself when other scene were loaded before (which indicates a menu scene). Optionally the Quantum game can be started from a SnapshotFile. More...

Inheritance diagram for Quantum.QuantumRunnerLocalDebug:
Quantum.QuantumMonoBehaviour

Classes

struct  DynamicAssetDBSettings
 Settings used to initialize the dynamic db. More...
 

Public Member Functions

async void Start ()
 Unity start event, will start the Quantum simulation. More...
 
void Update ()
 Unity update event. Will update the simulation if a custom SimulationSpeedMultiplier was set. More...
 

Public Attributes

TextAsset DatabaseFile
 Optionally starting the game using an asset db from a file. More...
 
QuantumUnityDBScope[] DBScopes
 DB scopes to preload. More...
 
SimulationUpdateTime DeltaTimeType = SimulationUpdateTime.EngineDeltaTime
 Set the DeltaTimeType to SimulationUpdateTime.EngineDeltaTime to not progress the simulation during break points. Has to be set before starting the runner and can only be changed on the runner directly during runtime: SessionRunner.DeltaTimeType. More...
 
DynamicAssetDBSettings DynamicAssetDB
 Set a dynamic asset db. More...
 
InstantReplaySettings InstantReplayConfig = InstantReplaySettings.Default
 Set InstantReplaySettings to enable instant replays. More...
 
bool IsLegacyFrameCopiesEnabled
 Set the QuantumGameFlags.IsLegacyFrameCopiesEnabled flag when starting Quantum. More...
 
RuntimePlayer[] LocalPlayers
 Configure the players added to the game after the simulation has started. More...
 
int MaxPlayerCount
 Overwrite the max player count for this simulation otherwise Quantum.Constants.PLAYER_COUNT is used. Default is 0. More...
 
bool PreloadAddressables = false
 Enabled loading Addressables before simulation start. More...
 
RecordingFlags RecordingFlags = RecordingFlags.None
 Set RecordingFlags of the local simulation to enable saving a replay. Caveat: Input recording allocates during runtime. More...
 
RuntimeConfig RuntimeConfig
 Configure the RuntimeConfig used for the local simulation. More...
 
QuantumDeterministicSessionConfigAsset SessionConfig
 Select the SessionConfig used for the local simulation. Will revert to the global default if not set. More...
 
float SimulationSpeedMultiplier = 1.0f
 Set a factor to increase or decrease the simulation speed and update the simulation during Update(). Default is 1. More...
 
TextAsset SnapshotFile
 Optionally start the game from a snapshot loaded from a file using QuantumReplayFile. More...
 
bool UseRandomSeed = false
 If set to true, the RuntimeConfig.Seed seed will be set to a random value. More...
 

Detailed Description

A Unity script that starts a local Quantum simulation from a gameplay scene. Requires a QuantumMapData in the hierarchy. Player are automatically added to the game which can be listed in LocalPlayers. The script disables itself when other scene were loaded before (which indicates a menu scene). Optionally the Quantum game can be started from a SnapshotFile.

Member Function Documentation

◆ Start()

async void Quantum.QuantumRunnerLocalDebug.Start ( )
inline

Unity start event, will start the Quantum simulation.

◆ Update()

void Quantum.QuantumRunnerLocalDebug.Update ( )
inline

Unity update event. Will update the simulation if a custom SimulationSpeedMultiplier was set.

Member Data Documentation

◆ DeltaTimeType

SimulationUpdateTime Quantum.QuantumRunnerLocalDebug.DeltaTimeType = SimulationUpdateTime.EngineDeltaTime

Set the DeltaTimeType to SimulationUpdateTime.EngineDeltaTime to not progress the simulation during break points. Has to be set before starting the runner and can only be changed on the runner directly during runtime: SessionRunner.DeltaTimeType.

◆ RecordingFlags

RecordingFlags Quantum.QuantumRunnerLocalDebug.RecordingFlags = RecordingFlags.None

Set RecordingFlags of the local simulation to enable saving a replay. Caveat: Input recording allocates during runtime.

◆ InstantReplayConfig

InstantReplaySettings Quantum.QuantumRunnerLocalDebug.InstantReplayConfig = InstantReplaySettings.Default

Set InstantReplaySettings to enable instant replays.

◆ RuntimeConfig

RuntimeConfig Quantum.QuantumRunnerLocalDebug.RuntimeConfig

Configure the RuntimeConfig used for the local simulation.

◆ SessionConfig

QuantumDeterministicSessionConfigAsset Quantum.QuantumRunnerLocalDebug.SessionConfig

Select the SessionConfig used for the local simulation. Will revert to the global default if not set.

◆ LocalPlayers

RuntimePlayer [] Quantum.QuantumRunnerLocalDebug.LocalPlayers

Configure the players added to the game after the simulation has started.

◆ MaxPlayerCount

int Quantum.QuantumRunnerLocalDebug.MaxPlayerCount

Overwrite the max player count for this simulation otherwise Quantum.Constants.PLAYER_COUNT is used. Default is 0.

◆ SimulationSpeedMultiplier

float Quantum.QuantumRunnerLocalDebug.SimulationSpeedMultiplier = 1.0f

Set a factor to increase or decrease the simulation speed and update the simulation during Update(). Default is 1.

◆ UseRandomSeed

bool Quantum.QuantumRunnerLocalDebug.UseRandomSeed = false

If set to true, the RuntimeConfig.Seed seed will be set to a random value.

◆ PreloadAddressables

bool Quantum.QuantumRunnerLocalDebug.PreloadAddressables = false

Enabled loading Addressables before simulation start.

◆ IsLegacyFrameCopiesEnabled

bool Quantum.QuantumRunnerLocalDebug.IsLegacyFrameCopiesEnabled

Set the QuantumGameFlags.IsLegacyFrameCopiesEnabled flag when starting Quantum.

◆ DynamicAssetDB

DynamicAssetDBSettings Quantum.QuantumRunnerLocalDebug.DynamicAssetDB

Set a dynamic asset db.

◆ SnapshotFile

TextAsset Quantum.QuantumRunnerLocalDebug.SnapshotFile

Optionally start the game from a snapshot loaded from a file using QuantumReplayFile.

◆ DatabaseFile

TextAsset Quantum.QuantumRunnerLocalDebug.DatabaseFile

Optionally starting the game using an asset db from a file.

◆ DBScopes

QuantumUnityDBScope [] Quantum.QuantumRunnerLocalDebug.DBScopes

DB scopes to preload.