Photon Fusion 1.1.2

Public Member Functions | List of all members
INetworkRunnerCallbacks Interface Reference

Interface for NetworkRunner callbacks. Register a class/struct instance which implements this interface with NetworkRunner.AddCallbacks(INetworkRunnerCallbacks[]). More...

Inherited by NetworkDelegates, and NetworkEvents.

Public Member Functions

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 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)
 
void OnShutdown (NetworkRunner runner, ShutdownReason shutdownReason)
 Called when the runner is shutdown More...
 
void OnConnectedToServer (NetworkRunner runner)
 Callback when NetworkRunner successfully connects to a server or host. More...
 
void OnDisconnectedFromServer (NetworkRunner runner)
 Callback when NetworkRunner disconnects from 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 OnConnectFailed (NetworkRunner runner, NetAddress remoteAddress, NetConnectFailedReason reason)
 Callback when NetworkRunner fails to connect to a server or host. More...
 
void OnUserSimulationMessage (NetworkRunner runner, SimulationMessagePtr message)
 This callback is invoked when a manually dispatched simulation message is received from a remote peer 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 OnCustomAuthenticationResponse (NetworkRunner runner, Dictionary< string, object > data)
 Callback is invoked when the Authentication procedure returns a response from the Authentication Server More...
 
void OnHostMigration (NetworkRunner runner, HostMigrationToken hostMigrationToken)
 Callback is invoked when the Host Migration process has started More...
 
void OnReliableDataReceived (NetworkRunner runner, PlayerRef player, ArraySegment< byte > data)
 
void OnSceneLoadDone (NetworkRunner runner)
 
void OnSceneLoadStart (NetworkRunner runner)
 

Detailed Description

Interface for NetworkRunner callbacks. Register a class/struct instance which implements this interface with NetworkRunner.AddCallbacks(INetworkRunnerCallbacks[]).

Member Function Documentation

◆ OnConnectedToServer()

void OnConnectedToServer ( NetworkRunner  runner)

Callback when NetworkRunner successfully connects to a server or host.

◆ OnConnectFailed()

void OnConnectFailed ( NetworkRunner  runner,
NetAddress  remoteAddress,
NetConnectFailedReason  reason 
)

Callback when NetworkRunner fails to connect to a server or host.

◆ OnConnectRequest()

void OnConnectRequest ( NetworkRunner  runner,
NetworkRunnerCallbackArgs.ConnectRequest  request,
byte[]  token 
)

Callback when NetworkRunner receives a Connection Request from a Remote Client

Parameters
runnerLocal NetworkRunner
requestRequest information
tokenRequest Token

◆ OnCustomAuthenticationResponse()

void OnCustomAuthenticationResponse ( NetworkRunner  runner,
Dictionary< string, object >  data 
)

Callback is invoked when the Authentication procedure returns a response from the Authentication Server

Parameters
runnerThe runner this object exists on
dataCustom Authentication Reply Values

◆ OnDisconnectedFromServer()

void OnDisconnectedFromServer ( NetworkRunner  runner)

Callback when NetworkRunner disconnects from a server or host.

◆ OnHostMigration()

void OnHostMigration ( NetworkRunner  runner,
HostMigrationToken  hostMigrationToken 
)

Callback is invoked when the Host Migration process has started

Parameters
runnerThe runner this object exists on
hostMigrationTokenMigration Token that stores all necessary information to restart the Fusion Runner

◆ OnInput()

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 *‍/ });

◆ OnInputMissing()

void OnInputMissing ( NetworkRunner  runner,
PlayerRef  player,
NetworkInput  input 
)

Parameters
runner
input

◆ OnPlayerJoined()

void OnPlayerJoined ( NetworkRunner  runner,
PlayerRef  player 
)

Callback from a NetworkRunner when a new player has joined.

◆ OnPlayerLeft()

void OnPlayerLeft ( NetworkRunner  runner,
PlayerRef  player 
)

Callback from a NetworkRunner when a player has disconnected.

◆ OnSessionListUpdated()

void OnSessionListUpdated ( NetworkRunner  runner,
List< SessionInfo sessionList 
)

This callback is invoked when a new List of Sessions is received from Photon Cloud

Parameters
runnerThe runner this object exists on
sessionListUpdated list of Session

◆ OnShutdown()

void OnShutdown ( NetworkRunner  runner,
ShutdownReason  shutdownReason 
)

Called when the runner is shutdown

Parameters
runnerThe runner being shutdown
shutdownReasonDescribes the reason Fusion was Shutdown

◆ OnUserSimulationMessage()

void OnUserSimulationMessage ( NetworkRunner  runner,
SimulationMessagePtr  message 
)

This callback is invoked when a manually dispatched simulation message is received from a remote peer

Parameters
runnerThe runner this message is for
messageThe message pointer