Photon Quantum 3.0.0

Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Quantum.QuantumRunnerUnityFactory Class Reference

Implements the runner factory to Unity platform. More...

Inheritance diagram for Quantum.QuantumRunnerUnityFactory:
Quantum.IRunnerFactory

Public Member Functions

IDeterministicGame CreateGame (QuantumGameStartParameters startParameters)
 Create a DeterministicGame instance. More...
 
void CreateProfiler (string clientId, DeterministicSessionConfig deterministicConfig, DeterministicPlatformInfo platformInfo, IDeterministicGame game)
 Create and attach a remote profiler to the game. More...
 
SessionRunner CreateRunner (SessionRunner.Arguments arguments)
 Creates a unity GameObject and attaches a QuantumRunnerBehaviour to it which will then update the actual session runner object. More...
 

Static Public Member Functions

static DeterministicPlatformInfo CreatePlatformInfo ()
 Create the Unity platform information object. More...
 
static void Init (Boolean force=false)
 Static initializer to initialize Quantum base systems required by the factory and Quantum in general. More...
 

Public Attributes

DeterministicPlatformInfo CreatePlaformInfo => CreatePlatformInfo()
 Create the Unity platform information object. More...
 
TaskFactory CreateTaskFactory => AsyncConfig.Global.TaskFactory
 Assign a task factory that will be used by the runner to create and chain new tasks. More...
 
Action UpdateDB => QuantumUnityDB.UpdateGlobal
 Assign an action to update the global database. More...
 

Static Public Attributes

static QuantumGameStartParameters CreateGameParameters
 Create game parameters and set default values based on the platform. More...
 
static IRunnerFactory DefaultFactory
 Statically keep one default factory around. More...
 

Additional Inherited Members

- Properties inherited from Quantum.IRunnerFactory
DeterministicPlatformInfo CreatePlaformInfo [get]
 Gather the platform information. There is a spelling mistake in the method name, but it's considered a bigger annoyance to change the interface. More...
 
TaskFactory CreateTaskFactory [get]
 Create a Quantum task factory. More...
 
Action UpdateDB [get]
 The action to when an update to the AssetDB is required. More...
 

Detailed Description

Implements the runner factory to Unity platform.

Member Function Documentation

◆ CreateRunner()

SessionRunner Quantum.QuantumRunnerUnityFactory.CreateRunner ( SessionRunner.Arguments  arguments)
inline

Creates a unity GameObject and attaches a QuantumRunnerBehaviour to it which will then update the actual session runner object.

Parameters
argumentsSession arguments
Returns
A session runner object

Implements Quantum.IRunnerFactory.

◆ CreateGame()

IDeterministicGame Quantum.QuantumRunnerUnityFactory.CreateGame ( QuantumGameStartParameters  startParameters)
inline

Create a DeterministicGame instance.

Parameters
startParametersGame start parameters
Returns
QuantumGame instance

Implements Quantum.IRunnerFactory.

◆ CreateProfiler()

void Quantum.QuantumRunnerUnityFactory.CreateProfiler ( string  clientId,
DeterministicSessionConfig  deterministicConfig,
DeterministicPlatformInfo  platformInfo,
IDeterministicGame  game 
)
inline

Create and attach a remote profiler to the game.

Parameters
clientIdClient id
deterministicConfigDeterministic config
platformInfoPlatform information
gameGame object

Implements Quantum.IRunnerFactory.

◆ CreatePlatformInfo()

static DeterministicPlatformInfo Quantum.QuantumRunnerUnityFactory.CreatePlatformInfo ( )
inlinestatic

Create the Unity platform information object.

Returns
Platform info object

◆ Init()

static void Quantum.QuantumRunnerUnityFactory.Init ( Boolean  force = false)
inlinestatic

Static initializer to initialize Quantum base systems required by the factory and Quantum in general.

Parameters
forceForce reload the LUT

Member Data Documentation

◆ DefaultFactory

IRunnerFactory Quantum.QuantumRunnerUnityFactory.DefaultFactory
static

Statically keep one default factory around.

◆ CreateGameParameters

QuantumGameStartParameters Quantum.QuantumRunnerUnityFactory.CreateGameParameters
static
Initial value:
=> new QuantumGameStartParameters {
CallbackDispatcher = QuantumCallback.Dispatcher,
AssetSerializer = new QuantumUnityJsonSerializer(),
EventDispatcher = QuantumEvent.Dispatcher,
ResourceManager = QuantumUnityDB.Global,
}

Create game parameters and set default values based on the platform.

◆ CreatePlaformInfo

DeterministicPlatformInfo Quantum.QuantumRunnerUnityFactory.CreatePlaformInfo => CreatePlatformInfo()

Create the Unity platform information object.

◆ CreateTaskFactory

TaskFactory Quantum.QuantumRunnerUnityFactory.CreateTaskFactory => AsyncConfig.Global.TaskFactory

Assign a task factory that will be used by the runner to create and chain new tasks.

◆ UpdateDB

Action Quantum.QuantumRunnerUnityFactory.UpdateDB => QuantumUnityDB.UpdateGlobal

Assign an action to update the global database.