A legacy way to hook into Quantum game callbacks. Use the publish subscribe pattern used by QuantumCallbacks instead. To use this callback class, derive from it and implement the methods you are interested in. The callback MonoBehaviour has to be added to the scene to work. More...
Public Member Functions | |
virtual void | OnChecksumError (QuantumGame game, DeterministicTickChecksumError error, Frame[] frames) |
Is called by CallbackChecksumError when a checksum error is detected. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on. More... | |
virtual void | OnGameDestroyed (QuantumGame game) |
Is called by CallbackGameDestroyed when the session has been destroyed."/> More... | |
virtual void | OnGameInit (QuantumGame game, bool isResync) |
Is called by CallbackGameInit during QuantumGame.OnGameStart(DeterministicFrame) when the game is about to start. More... | |
virtual void | OnGameResync (QuantumGame game) |
Is called by CallbackGameResynced during QuantumGame.OnGameResync when the game has been re-synchronized from a snapshot and is about to start. More... | |
virtual void | OnGameStart (QuantumGame game) |
Obsolete: use other OnGameStart overload. More... | |
virtual void | OnGameStart (QuantumGame game, bool isResync) |
Is called by CallbackGameStarted during QuantumGame.OnGameStart or QuantumGame.OnGameResync" when the game is started after systems are initialized and the snapshot has arrived for late-joining clients. More... | |
virtual void | OnSimulateFinished (QuantumGame game, Frame frame) |
Is called by CallbackSimulateFinished after completing the simulation of a frame. More... | |
virtual void | OnUnitySceneLoadBegin (QuantumGame game) |
Is called by CallbackUnitySceneLoadBegin when a Unity scene is about to be loaded. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on. More... | |
virtual void | OnUnitySceneLoadDone (QuantumGame game) |
Is called by CallbackUnitySceneLoadDone when a Unity scene has been loaded. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on. More... | |
virtual void | OnUnitySceneUnloadBegin (QuantumGame game) |
Is called by CallbackUnitySceneUnloadBegin when a Unity scene is about to be unloaded. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on. More... | |
virtual void | OnUnitySceneUnloadDone (QuantumGame game) |
Is called by CallbackUnitySceneUnloadDone when a Unity scene has been unloaded. More... | |
virtual void | OnUpdateView (QuantumGame game) |
Is called by CallbackUpdateView which is originally called by QuantumRunner.Update and it is called every Unity frame. More... | |
Static Public Attributes | |
static readonly List< QuantumCallbacks > | Instances = new List<QuantumCallbacks>() |
Static list of all instances of QuantumCallbacks to call on Quantum callbacks. Populated on OnEnable and OnDisable. More... | |
Protected Member Functions | |
virtual void | OnDisable () |
Unity OnDisable event removes itself from the static callback list. More... | |
virtual void | OnEnable () |
Unity OnEnable event registers this instance to the static list called by the Quantum callbacks. More... | |
A legacy way to hook into Quantum game callbacks. Use the publish subscribe pattern used by QuantumCallbacks instead. To use this callback class, derive from it and implement the methods you are interested in. The callback MonoBehaviour has to be added to the scene to work.
|
inlineprotectedvirtual |
Unity OnEnable event registers this instance to the static list called by the Quantum callbacks.
|
inlineprotectedvirtual |
Unity OnDisable event removes itself from the static callback list.
|
inlinevirtual |
Is called by CallbackGameInit during QuantumGame.OnGameStart(DeterministicFrame) when the game is about to start.
game | The Quantum game |
isResync | Is true when the simulation is paused and waits for snapshot to commence the start. |
|
inlinevirtual |
Obsolete: use other OnGameStart overload.
game |
|
inlinevirtual |
Is called by CallbackGameStarted during QuantumGame.OnGameStart or QuantumGame.OnGameResync" when the game is started after systems are initialized and the snapshot has arrived for late-joining clients.
game | Quantum game |
isResync | Is true if the game was started from a snapshot. |
|
inlinevirtual |
Is called by CallbackGameResynced during QuantumGame.OnGameResync when the game has been re-synchronized from a snapshot and is about to start.
game | Quantum game |
|
inlinevirtual |
Is called by CallbackGameDestroyed when the session has been destroyed."/>
game | Quantum game |
|
inlinevirtual |
Is called by CallbackUpdateView which is originally called by QuantumRunner.Update and it is called every Unity frame.
game | Quantum game |
|
inlinevirtual |
Is called by CallbackSimulateFinished after completing the simulation of a frame.
game | Quantum game |
frame | Completed frame |
|
inlinevirtual |
Is called by CallbackUnitySceneLoadBegin when a Unity scene is about to be loaded. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on.
game | Quantum game |
|
inlinevirtual |
Is called by CallbackUnitySceneLoadDone when a Unity scene has been loaded. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on.
game | Quantum game |
|
inlinevirtual |
Is called by CallbackUnitySceneUnloadBegin when a Unity scene is about to be unloaded. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on.
game | Quantum game |
|
inlinevirtual |
Is called by CallbackUnitySceneUnloadDone when a Unity scene has been unloaded.
game | Quantum game |
|
inlinevirtual |
Is called by CallbackChecksumError when a checksum error is detected. To enable this feature SimulationConfig.AutoLoadSceneFromMap must be toggled on.
game | Quantum game |
error | Error description |
frames | List of latest frames |
|
static |
Static list of all instances of QuantumCallbacks to call on Quantum callbacks. Populated on OnEnable and OnDisable.