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                
    • Event triggered when server initialize his connection and start to listen for clients.
  • OnConnected                        
    • Event triggered when the client successfully connects to the server.
  • OnDisconnected                        
    • Event triggered when the client disconnects from the server.     
  • OnConnectedOnRelay                
    • Event triggered when the client establishes a connection with a relay server.
  • OnServerRestarted                
    • Event triggered when the client detects that the server has restarted.
  • OnConnectionFailed                
    • Event triggered when the client fails to connect to the server.        
  • OnLoginFailed                        
    • Event triggered when the client fails to log in to the server.
  • OnLoginSucess                        
    • Event triggered when the client successfully logs in to the server.
  • OnClientConnected                
    • Event triggered when a new client connects to the server.
  • OnClientDisconnected                
    • Event triggered when a client disconnects from the server.
  • OnClientLoginFailed                
    • Event triggered when a client attempts to log in with invalid credentials.
  • OnClientLoginSucess                
    • Event triggered when a client successfully logs in to the server.
  • OnMessageReceived                
    • Event triggered when a message is received by either the client or the server.
  • OnLobbyCreationSucess        
    • Event triggered when the client successfully creates a lobby.
  • OnLobbyCreationFailed        
    • Event triggered when the client fails to create a lobby.
  • OnLobbyJoinSucess                
    • Event triggered when the client successfully joins a lobby.
  • OnLobbyJoinFailed                
    • Event triggered when the client fails to join a lobby.



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.