Photon Quantum 3.0.0

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

Similar to the CustomCallback script and the QuantumRunnerLocalDebug this script will add all players inside the RuntimePlayer list as local players to Quantum during the game start. The script must Awake before starting the game and it works for local debug and online matches via a menu. Remove this script from your scene when the players are only added inside the menu classes (use the Player list in QuantumRunnerLocalDebug to start game scenes directly). More...

Inheritance diagram for Quantum.QuantumAddRuntimePlayers:
Quantum.QuantumMonoBehaviour

Public Member Functions

void Awake ()
 Unity Awake event, used to subscribe to the game start event of QuantumRunner.Default. More...
 
void OnGameStarted (QuantumGame game, bool isResync)
 Add all players to the game. More...
 

Public Attributes

RuntimePlayer[] Players
 These RuntimePlayer represent the players that will be added on game start. More...
 

Detailed Description

Similar to the CustomCallback script and the QuantumRunnerLocalDebug this script will add all players inside the RuntimePlayer list as local players to Quantum during the game start. The script must Awake before starting the game and it works for local debug and online matches via a menu. Remove this script from your scene when the players are only added inside the menu classes (use the Player list in QuantumRunnerLocalDebug to start game scenes directly).

Member Function Documentation

◆ Awake()

void Quantum.QuantumAddRuntimePlayers.Awake ( )
inline

Unity Awake event, used to subscribe to the game start event of QuantumRunner.Default.

◆ OnGameStarted()

void Quantum.QuantumAddRuntimePlayers.OnGameStarted ( QuantumGame  game,
bool  isResync 
)
inline

Add all players to the game.

Parameters
gameQuantum game
isResyncIsResync indicates the client is late-joining or reconnecting to a Quantum game

Member Data Documentation

◆ Players

RuntimePlayer [] Quantum.QuantumAddRuntimePlayers.Players

These RuntimePlayer represent the players that will be added on game start.