Interface for NetworkRunner callbacks. Register a class/struct instance which implements this interface with NetworkRunner.AddCallbacks(INetworkRunnerCallbacks[]). More...
Inherits IPublicFacingInterface.
Inherited by NetworkDelegates, and NetworkEvents.
Public Member Functions | |
void | OnConnectedToServer (NetworkRunner runner) |
Callback when NetworkRunner successfully connects to a server or host. More... | |
void | OnConnectFailed (NetworkRunner runner, NetAddress remoteAddress, NetConnectFailedReason reason) |
Callback when NetworkRunner fails to connect to a server or host. More... | |
void | OnConnectRequest (NetworkRunner runner, NetworkRunnerCallbackArgs.ConnectRequest request, byte[] token) |
Callback when NetworkRunner receives a Connection Request from a Remote Client More... | |
void | OnCustomAuthenticationResponse (NetworkRunner runner, Dictionary< string, object > data) |
Callback is invoked when the Authentication procedure returns a response from the Authentication Server More... | |
void | OnDisconnectedFromServer (NetworkRunner runner, NetDisconnectReason reason) |
Callback when NetworkRunner disconnects from a server or host. More... | |
void | OnHostMigration (NetworkRunner runner, HostMigrationToken hostMigrationToken) |
Callback is invoked when the Host Migration process has started More... | |
void | OnInput (NetworkRunner runner, NetworkInput input) |
Callback from NetworkRunner that polls for user inputs. The NetworkInput that is supplied expects: More... | |
void | OnInputMissing (NetworkRunner runner, PlayerRef player, NetworkInput input) |
Callback from NetworkRunner when an input is missing. More... | |
void | OnObjectEnterAOI (NetworkRunner runner, NetworkObject obj, PlayerRef player) |
Callback from a NetworkRunner when a new NetworkObject has entered the Area of Interest More... | |
void | OnObjectExitAOI (NetworkRunner runner, NetworkObject obj, PlayerRef player) |
Callback from a NetworkRunner when a new NetworkObject has exit the Area of Interest More... | |
void | OnPlayerJoined (NetworkRunner runner, PlayerRef player) |
Callback from a NetworkRunner when a new player has joined. More... | |
void | OnPlayerLeft (NetworkRunner runner, PlayerRef player) |
Callback from a NetworkRunner when a player has disconnected. More... | |
void | OnReliableDataProgress (NetworkRunner runner, PlayerRef player, ReliableKey key, float progress) |
Callback is invoked when a Reliable Data Stream is being received, reporting its progress More... | |
void | OnReliableDataReceived (NetworkRunner runner, PlayerRef player, ReliableKey key, ArraySegment< byte > data) |
Callback is invoked when a Reliable Data Stream has been received More... | |
void | OnSceneLoadDone (NetworkRunner runner) |
Callback is invoked when a Scene Load has finished More... | |
void | OnSceneLoadStart (NetworkRunner runner) |
Callback is invoked when a Scene Load has started More... | |
void | OnSessionListUpdated (NetworkRunner runner, List< SessionInfo > sessionList) |
This callback is invoked when a new List of Sessions is received from Photon Cloud More... | |
void | OnShutdown (NetworkRunner runner, ShutdownReason shutdownReason) |
Called when the runner is shutdown More... | |
void | OnUserSimulationMessage (NetworkRunner runner, SimulationMessagePtr message) |
This callback is invoked when a manually dispatched simulation message is received from a remote peer More... | |
Interface for NetworkRunner callbacks. Register a class/struct instance which implements this interface with NetworkRunner.AddCallbacks(INetworkRunnerCallbacks[]).
void OnConnectedToServer | ( | NetworkRunner | runner | ) |
Callback when NetworkRunner successfully connects to a server or host.
void OnConnectFailed | ( | NetworkRunner | runner, |
NetAddress | remoteAddress, | ||
NetConnectFailedReason | reason | ||
) |
Callback when NetworkRunner fails to connect to a server or host.
void OnConnectRequest | ( | NetworkRunner | runner, |
NetworkRunnerCallbackArgs.ConnectRequest | request, | ||
byte[] | token | ||
) |
Callback when NetworkRunner receives a Connection Request from a Remote Client
runner | Local NetworkRunner |
request | Request information |
token | Request Token |
void OnCustomAuthenticationResponse | ( | NetworkRunner | runner, |
Dictionary< string, object > | data | ||
) |
Callback is invoked when the Authentication procedure returns a response from the Authentication Server
runner | The runner this object exists on |
data | Custom Authentication Reply Values |
void OnDisconnectedFromServer | ( | NetworkRunner | runner, |
NetDisconnectReason | reason | ||
) |
Callback when NetworkRunner disconnects from a server or host.
void OnHostMigration | ( | NetworkRunner | runner, |
HostMigrationToken | hostMigrationToken | ||
) |
Callback is invoked when the Host Migration process has started
runner | The runner this object exists on |
hostMigrationToken | Migration Token that stores all necessary information to restart the Fusion Runner |
void OnInput | ( | NetworkRunner | runner, |
NetworkInput | input | ||
) |
Callback from NetworkRunner that polls for user inputs. The NetworkInput that is supplied expects:
input.Set(new CustomINetworkInput() { /* your values */ });
void OnInputMissing | ( | NetworkRunner | runner, |
PlayerRef | player, | ||
NetworkInput | input | ||
) |
Callback from NetworkRunner when an input is missing.
runner | NetworkRunner reference |
player | PlayerRef reference which the input is missing from |
input | NetworkInput reference which is missing |
void OnObjectEnterAOI | ( | NetworkRunner | runner, |
NetworkObject | obj, | ||
PlayerRef | player | ||
) |
Callback from a NetworkRunner when a new NetworkObject has entered the Area of Interest
runner | NetworkRunner reference |
obj | NetworkObject reference |
player | PlayerRef reference |
void OnObjectExitAOI | ( | NetworkRunner | runner, |
NetworkObject | obj, | ||
PlayerRef | player | ||
) |
Callback from a NetworkRunner when a new NetworkObject has exit the Area of Interest
runner | NetworkRunner reference |
obj | NetworkObject reference |
player | PlayerRef reference |
void OnPlayerJoined | ( | NetworkRunner | runner, |
PlayerRef | player | ||
) |
Callback from a NetworkRunner when a new player has joined.
void OnPlayerLeft | ( | NetworkRunner | runner, |
PlayerRef | player | ||
) |
Callback from a NetworkRunner when a player has disconnected.
void OnReliableDataProgress | ( | NetworkRunner | runner, |
PlayerRef | player, | ||
ReliableKey | key, | ||
float | progress | ||
) |
Callback is invoked when a Reliable Data Stream is being received, reporting its progress
runner | NetworkRunner reference |
player | Which PlayerRef the stream is being sent from |
key | ReliableKey reference that identifies the data stream |
progress | Progress of the stream |
void OnReliableDataReceived | ( | NetworkRunner | runner, |
PlayerRef | player, | ||
ReliableKey | key, | ||
ArraySegment< byte > | data | ||
) |
Callback is invoked when a Reliable Data Stream has been received
runner | NetworkRunner reference |
player | Which PlayerRef the stream was sent from |
key | ReliableKey reference that identifies the data stream |
data | Data received |
void OnSceneLoadDone | ( | NetworkRunner | runner | ) |
Callback is invoked when a Scene Load has finished
runner | NetworkRunner reference |
void OnSceneLoadStart | ( | NetworkRunner | runner | ) |
Callback is invoked when a Scene Load has started
runner | NetworkRunner reference |
void OnSessionListUpdated | ( | NetworkRunner | runner, |
List< SessionInfo > | sessionList | ||
) |
This callback is invoked when a new List of Sessions is received from Photon Cloud
runner | The runner this object exists on |
sessionList | Updated list of Session |
void OnShutdown | ( | NetworkRunner | runner, |
ShutdownReason | shutdownReason | ||
) |
Called when the runner is shutdown
runner | The runner being shutdown |
shutdownReason | Describes the reason Fusion was Shutdown |
void OnUserSimulationMessage | ( | NetworkRunner | runner, |
SimulationMessagePtr | message | ||
) |
This callback is invoked when a manually dispatched simulation message is received from a remote peer
runner | The runner this message is for |
message | The message pointer |