Photon Quantum 3.0.0

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

A debug script that starts the Quantum simulation for MaxPlayerCount players when starting the game from a gameplay scene. Will add LocalPlayers as local players during simulation start. The script will disable itself when it detects that other scene were loaded before this (to delegate adding players to a menu scene / game bootstrap). More...

Inheritance diagram for Quantum.QuantumRunnerLocalDebug:
Quantum.QuantumMonoBehaviour

Classes

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

Public Member Functions

void OnGUI ()
 Unity OnGUI event updates the debug runner UI. More...
 
void Start ()
 Unity start event, will start the Quantum simulation. More...
 
void StartWithFrame (int frameNumber=0, byte[] frameData=null)
 Start the Quantum simulation with a specific frame number and frame data. More...
 
void Update ()
 Unity update event. Will update the simulation if a custom SimulationSpeedMultiplier was set. More...
 

Public Attributes

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...
 
SimulationUpdateTime DeltaTypeType => DeltaTimeType
 Use DeltaTimeType instead. More...
 
bool DisplaySaveAndReloadButton
 Show the reload simulation button. More...
 
DynamicAssetDBSettings DynamicAssetDB
 Set a dynamic asset db. More...
 
InstantReplaySettings InstantReplayConfig = InstantReplaySettings.Default
 Set InstantReplaySettings to enable instant replays. 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...
 
UnityEvent< SessionRunner.ArgumentsOnBeforeStart
 Unity event that is called before the Quantum simulation is started. 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...
 
bool UseRandomSeed = false
 If set to true, the RuntimeConfig.Seed seed will be set to a random value. More...
 

Detailed Description

A debug script that starts the Quantum simulation for MaxPlayerCount players when starting the game from a gameplay scene. Will add LocalPlayers as local players during simulation start. The script will disable itself when it detects that other scene were loaded before this (to delegate adding players to a menu scene / game bootstrap).

Member Function Documentation

◆ Start()

void Quantum.QuantumRunnerLocalDebug.Start ( )
inline

Unity start event, will start the Quantum simulation.

◆ StartWithFrame()

void Quantum.QuantumRunnerLocalDebug.StartWithFrame ( int  frameNumber = 0,
byte[]  frameData = null 
)
inline

Start the Quantum simulation with a specific frame number and frame data.

Parameters
frameNumberFrame number
frameDataFrame data to start from
Exceptions
ExceptionIs raised when no map was found in the scene.

◆ OnGUI()

void Quantum.QuantumRunnerLocalDebug.OnGUI ( )
inline

Unity OnGUI event updates the debug runner UI.

◆ 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.

◆ DeltaTypeType

SimulationUpdateTime Quantum.QuantumRunnerLocalDebug.DeltaTypeType => DeltaTimeType

Use DeltaTimeType instead.

◆ 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.

◆ UseRandomSeed

bool Quantum.QuantumRunnerLocalDebug.UseRandomSeed = false

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

◆ 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.

◆ DisplaySaveAndReloadButton

bool Quantum.QuantumRunnerLocalDebug.DisplaySaveAndReloadButton

Show the reload simulation button.

◆ PreloadAddressables

bool Quantum.QuantumRunnerLocalDebug.PreloadAddressables = false

Enabled loading Addressables before simulation start.

◆ DynamicAssetDB

DynamicAssetDBSettings Quantum.QuantumRunnerLocalDebug.DynamicAssetDB

Set a dynamic asset db.

◆ OnBeforeStart

UnityEvent<SessionRunner.Arguments> Quantum.QuantumRunnerLocalDebug.OnBeforeStart

Unity event that is called before the Quantum simulation is started.