Arguments to start an online or offline Quantum simulation. More...
Public Member Functions | |
void | Validate () |
Validate, log warnings and throw exceptions on errors. More... | |
Static Public Member Functions | |
static Arguments | CreateDefault () |
Initializes struct with default values. More... | |
Public Attributes | |
CancellationToken | CancellationToken |
A cancellation token to stop all async tasks (only used during StartAsync()). More... | |
string | ClientId |
The Quantum ClientId is a secret between the client and the server and is used when reconnecting into a running simulation to preserve the player index. More... | |
ICommunicator | Communicator |
Quantum communicator which encapsulates the connection object (from Photon Realtime). More... | |
SimulationUpdateTime | DeltaTimeType |
Will be used by the Unity runner to update the Quantum simulation with different delta time settings. More... | |
Byte[] | FrameData |
Serialized frame to start the simulation from. Requires InitialFrame to be set as well. This can be a reconnect or an instant replay where we already have a frame snapshot locally (QuantumInstantReplay). More... | |
DeterministicGameMode | GameMode |
The game mode (default is Multiplayer). Local mode is for testing only, the simulation is not connected online. It does not go into prediction nor does it perform rollbacks. Replay mode will also run offline and requires the ReplayProvider to be set to process the input. Spectating mode will run the simulation without a player and without the ability to input. More... | |
QuantumGameStartParameters | GameParameters |
Encapsulated QuantumGameStartParameters. More... | |
Int32 | InitialTick |
The initial tick to start the simulation from as set in FrameData (only set this when FrameData is set as well). The initial frame is also encoded in the data, but required deserialization first. More... | |
Action< ShutdownCause, SessionRunner > | OnShutdown |
The LoadBalancingClient object needs to be connected to game sever (joined a room) when handed to Quantum. Is not required for Replay or Local game modes. More... | |
Int32 | PlayerCount |
Setting a player count here will overwrite the SessionConfig.PlayerCount during runner creation. Either SessionConfig.Player or this PlayerCount needs to be > 0. More... | |
RecordingFlags | RecordingFlags |
The recording flags will enable the recording of input and checksums (requires memory and allocations). When enabled QuantumGame.GetRecordedReplay can be used access the replay data. More... | |
IDeterministicReplayProvider | ReplayProvider |
The replay provider injects recorded inputs and rpcs into the game which is required to run the game as a replay. InputProvider is an implementation of the replay provider. See usages of QuantumGame.RecordedInputs and QuantumRunnerLocalReplay.InputProvider. More... | |
IRunnerFactory | RunnerFactory |
Runner factory to create platform dependent objects. More... | |
string | RunnerId |
Optionally name the runner to access it from by id. This is useful when multiple runners are active on the client (for example an instant replay). More... | |
IRuntimeConfig | RuntimeConfig |
The runtime config the Quantum game should use. Every client needs to set it, the server selects the first one send to it. More... | |
DeterministicSessionConfig | SessionConfig |
The deterministic config the Quantum game should use. Every client needs to set it, the server selects the first one send to it. More... | |
float? | StartGameTimeoutInSeconds |
If set it defines the timeout in seconds to wait for StartGame() to commence the online game. This includes for example sending configurations and waiting for a snapshot. If not set the default timeout is used defined by DefaultStartGameTimeoutInSeconds. This value is not related to DeterministicSessionConfig.SessionStartTimeout, but it's affected by it. The SessionStartTimeout should not be larger than this value. Use WaitForGameStart() to manually wait for the start. Be sure to Shutdown() the runner in case of exceptions. More... | |
InactiveTaskRunner | TaskRunner |
The Quantum internal task runner. More... | |
Static Public Attributes | |
const float | DefaultStartGameTimeoutInSeconds = 10.0f |
The default start game timeout. Overwrite by setting explicit StartGameTimeoutInSeconds. More... | |
Properties | |
IAssetSerializer | AssetSerializer [get, set] |
Will set QuantumGameStartParameters.AssetSerializer More... | |
ICallbackDispatcher | CallbackDispatcher [get, set] |
Will set QuantumGameStartParameters.CallbackDispatcher More... | |
IEventDispatcher | EventDispatcher [get, set] |
Will set QuantumGameStartParameters.EventDispatcher More... | |
int | GameFlags [get, set] |
GameFlags from QuantumGameFlags. Will set QuantumGameStartParameters.GameFlags. More... | |
int | HeapExtraCount [get, set] |
Extra heaps to allocate for a session in case you need to create 'auxiliary' frames than actually required for the simulation itself. Will set QuantumGameStartParameters.HeapExtraCount More... | |
DynamicAssetDB | InitialDynamicAssets [get, set] |
Optionally provide assets to be added to the dynamic asset db. This can be used to introduce procedurally generated assets into the simulation from the start. Will set QuantumGameStartParameters.InitialDynamicAssets More... | |
Int32 | InitialFrame [get, set] |
Obsolete: use InitialTick More... | |
InstantReplaySettings | InstantReplaySettings [get, set] |
The instant replay feature requires this setup data for snapshot recording. More... | |
IResourceManager | ResourceManager [get, set] |
Optionally override the resource manager for example from deserialized Quantum assets (as showcased in QuantumRunnerLocalReplay). Will set QuantumGameStartParameters.ResourceManager More... | |
Arguments to start an online or offline Quantum simulation.
|
inlinestatic |
Initializes struct with default values.
|
inline |
Validate, log warnings and throw exceptions on errors.
SessionRunnerException | Communicator object invalid. |
|
static |
The default start game timeout. Overwrite by setting explicit StartGameTimeoutInSeconds.
string Quantum.SessionRunner.Arguments.ClientId |
The Quantum ClientId is a secret between the client and the server and is used when reconnecting into a running simulation to preserve the player index.
IRuntimeConfig Quantum.SessionRunner.Arguments.RuntimeConfig |
The runtime config the Quantum game should use. Every client needs to set it, the server selects the first one send to it.
DeterministicSessionConfig Quantum.SessionRunner.Arguments.SessionConfig |
The deterministic config the Quantum game should use. Every client needs to set it, the server selects the first one send to it.
IDeterministicReplayProvider Quantum.SessionRunner.Arguments.ReplayProvider |
The replay provider injects recorded inputs and rpcs into the game which is required to run the game as a replay. InputProvider is an implementation of the replay provider. See usages of QuantumGame.RecordedInputs and QuantumRunnerLocalReplay.InputProvider.
DeterministicGameMode Quantum.SessionRunner.Arguments.GameMode |
The game mode (default is Multiplayer). Local mode is for testing only, the simulation is not connected online. It does not go into prediction nor does it perform rollbacks. Replay mode will also run offline and requires the ReplayProvider to be set to process the input. Spectating mode will run the simulation without a player and without the ability to input.
Int32 Quantum.SessionRunner.Arguments.InitialTick |
The initial tick to start the simulation from as set in FrameData (only set this when FrameData is set as well). The initial frame is also encoded in the data, but required deserialization first.
Byte [] Quantum.SessionRunner.Arguments.FrameData |
Serialized frame to start the simulation from. Requires InitialFrame to be set as well. This can be a reconnect or an instant replay where we already have a frame snapshot locally (QuantumInstantReplay).
string Quantum.SessionRunner.Arguments.RunnerId |
Optionally name the runner to access it from by id. This is useful when multiple runners are active on the client (for example an instant replay).
Int32 Quantum.SessionRunner.Arguments.PlayerCount |
Setting a player count here will overwrite the SessionConfig.PlayerCount during runner creation. Either SessionConfig.Player or this PlayerCount needs to be > 0.
float? Quantum.SessionRunner.Arguments.StartGameTimeoutInSeconds |
If set it defines the timeout in seconds to wait for StartGame() to commence the online game. This includes for example sending configurations and waiting for a snapshot. If not set the default timeout is used defined by DefaultStartGameTimeoutInSeconds. This value is not related to DeterministicSessionConfig.SessionStartTimeout, but it's affected by it. The SessionStartTimeout should not be larger than this value. Use WaitForGameStart() to manually wait for the start. Be sure to Shutdown() the runner in case of exceptions.
Action<ShutdownCause, SessionRunner> Quantum.SessionRunner.Arguments.OnShutdown |
The LoadBalancingClient object needs to be connected to game sever (joined a room) when handed to Quantum. Is not required for Replay or Local game modes.
ICommunicator Quantum.SessionRunner.Arguments.Communicator |
Quantum communicator which encapsulates the connection object (from Photon Realtime).
IRunnerFactory Quantum.SessionRunner.Arguments.RunnerFactory |
Runner factory to create platform dependent objects.
InactiveTaskRunner Quantum.SessionRunner.Arguments.TaskRunner |
The Quantum internal task runner.
CancellationToken Quantum.SessionRunner.Arguments.CancellationToken |
A cancellation token to stop all async tasks (only used during StartAsync()).
QuantumGameStartParameters Quantum.SessionRunner.Arguments.GameParameters |
Encapsulated QuantumGameStartParameters.
SimulationUpdateTime Quantum.SessionRunner.Arguments.DeltaTimeType |
Will be used by the Unity runner to update the Quantum simulation with different delta time settings.
RecordingFlags Quantum.SessionRunner.Arguments.RecordingFlags |
The recording flags will enable the recording of input and checksums (requires memory and allocations). When enabled QuantumGame.GetRecordedReplay can be used access the replay data.
|
getset |
Obsolete: use InitialTick
|
getset |
Optionally override the resource manager for example from deserialized Quantum assets (as showcased in QuantumRunnerLocalReplay). Will set QuantumGameStartParameters.ResourceManager
|
getset |
|
getset |
|
getset |
|
getset |
The instant replay feature requires this setup data for snapshot recording.
|
getset |
Extra heaps to allocate for a session in case you need to create 'auxiliary' frames than actually required for the simulation itself. Will set QuantumGameStartParameters.HeapExtraCount
|
getset |
Optionally provide assets to be added to the dynamic asset db. This can be used to introduce procedurally generated assets into the simulation from the start. Will set QuantumGameStartParameters.InitialDynamicAssets
|
getset |
GameFlags from QuantumGameFlags. Will set QuantumGameStartParameters.GameFlags.