Global Events
ObjectNet considers a Global Event, all events related to internal engine control.
NetworkEventsManager allows the user to catch those events and implement any custom logic.
Currently, NetworkEventsManager is allowed to listen to the following global events :
OnServerStarted
triggered when server initialize his connection and start to listen for clients
OnConnected
triggered when the client successfully connects to the server.
OnDisconnected
triggered when the client disconnects from the server.
OnConnectedOnRelay
triggered when the client establishes a connection with a relay server.
OnServerRestarted
triggered when the client detects that the server has restarted.
OnConnectionFailed
triggered when the client fails to connect to the server.
OnLoginFailed
triggered when the client fails to log in to the server.
OnLoginSucess
triggered when the client successfully logs in to the server.
OnClientConnected
triggered when a new client connects to the server.
OnClientDisconnected
triggered when a client disconnects from the server.
OnClientLoginFailed
triggered when a client attempts to log in with invalid credentials.
OnClientLoginSucess
triggered when a client successfully logs in to the server
OnMessageReceived
triggered when a message is received by either the client or the server.
OnLobbyCreationSucess
triggered when the client successfully creates a lobby.
OnLobbyCreationFailed
triggered when the client fails to create a lobby.
OnLobbyJoinSucess
triggered when the client successfully joins a lobby
OnLobbyJoinFailed
triggered when the client fails to join a lobby.
OnLobbyPlayersRefresh
triggered when the client recive lobby players list
OnPlayerSpawned
triggered when some player get spawned
OnPlayerStarted
triggerd when some player start hist network instance
OnPlayerOwnerDetected
triggered when the client becomes owner of his player
OnSceneLoadFinished
triggered when all clients in the same match load a scene
OnSceneUnLoadFinished
triggered when all clients in the same match unload a scene
OnConnectionIdAssigned
triggered just after client receive his connection id from server
Red Color: Events that only trigger on the Server
Blue Color: Events that only trigger on the Clients
Yellow Color: Triggered on both Server and Clients
Full detailed information can be found on API documents.
You can find a full example of how to implement global events listener on "15 - Global Events" scene.
Last updated