# 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 :&#x20;

<table><thead><tr><th width="212">Event</th><th>Explained</th></tr></thead><tbody><tr><td><mark style="color:red;"><strong>OnServerStarted</strong></mark></td><td>triggered when server initialize his connection and start to listen for clients</td></tr><tr><td><mark style="color:blue;"><strong>OnConnected</strong>  </mark>  </td><td>triggered when the client successfully connects to the server.  </td></tr><tr><td><mark style="color:blue;"><strong>OnDisconnected</strong></mark></td><td>triggered when the client disconnects from the server.</td></tr><tr><td><mark style="color:blue;"><strong>OnConnectedOnRelay</strong></mark></td><td>triggered when the client establishes a connection with a relay server.</td></tr><tr><td><mark style="color:blue;"><strong>OnServerRestarted</strong></mark></td><td>triggered when the client detects that the server has restarted.</td></tr><tr><td><mark style="color:blue;"><strong>OnConnectionFailed</strong></mark></td><td>triggered when the client fails to connect to the server.</td></tr><tr><td><mark style="color:blue;"><strong>OnLoginFailed</strong></mark></td><td>triggered when the client fails to log in to the server.</td></tr><tr><td><mark style="color:blue;"><strong>OnLoginSucess</strong></mark></td><td>triggered when the client successfully logs in to the server.</td></tr><tr><td><mark style="color:red;"><strong>OnClientConnected</strong></mark></td><td>triggered when a new client connects to the server.</td></tr><tr><td><mark style="color:red;"><strong>OnClientDisconnected</strong></mark></td><td>triggered when a client disconnects from the server.</td></tr><tr><td><mark style="color:red;"><strong>OnClientLoginFailed</strong></mark></td><td>triggered when a client attempts to log in with invalid credentials.</td></tr><tr><td><mark style="color:red;"><strong>OnClientLoginSucess</strong></mark></td><td>triggered when a client successfully logs in to the server</td></tr><tr><td><mark style="color:yellow;"><strong>OnMessageReceived</strong></mark></td><td>triggered when a message is received by either the client or the server.</td></tr><tr><td><mark style="color:blue;"><strong>OnLobbyCreationSucess</strong></mark></td><td>triggered when the client successfully creates a lobby.</td></tr><tr><td><mark style="color:blue;"><strong>OnLobbyCreationFailed</strong></mark></td><td>triggered when the client fails to create a lobby.</td></tr><tr><td><mark style="color:blue;"><strong>OnLobbyJoinSucess</strong></mark></td><td>triggered when the client successfully joins a lobby</td></tr><tr><td><mark style="color:blue;"><strong>OnLobbyJoinFailed</strong></mark></td><td>triggered when the client fails to join a lobby.</td></tr><tr><td><mark style="color:blue;"><strong>OnLobbyPlayersRefresh</strong></mark></td><td>triggered when the client recive lobby players list</td></tr><tr><td><mark style="color:yellow;"><strong>OnPlayerSpawned</strong></mark></td><td>triggered when some player get spawned</td></tr><tr><td><mark style="color:yellow;"><strong>OnPlayerStarted</strong></mark></td><td>triggerd when some player start hist network instance</td></tr><tr><td><mark style="color:blue;"><strong>OnPlayerOwnerDetected</strong></mark></td><td>triggered when the client becomes owner of his player</td></tr><tr><td><mark style="color:blue;"><strong>OnSceneLoadFinished</strong></mark></td><td>triggered when all clients in the same match load a scene</td></tr><tr><td><mark style="color:blue;"><strong>OnSceneUnLoadFinished</strong></mark></td><td>triggered when all clients in the same match unload a scene</td></tr><tr><td><mark style="color:blue;"><strong>OnConnectionIdAssigned</strong></mark></td><td>triggered just after client receive his connection id from server</td></tr></tbody></table>

<mark style="color:red;">**Red Color:**</mark>      Events that only trigger on the <mark style="color:red;">**Server**</mark> ![](https://3009462755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNG75ky1pR1kRokWLRnzy%2Fuploads%2F6hZG9MSplG3CWbnxqKTV%2FScreenshot%202025-04-19%20230203.png?alt=media\&token=f60724f7-05b5-4d87-9af3-286f3c2a03a0)

<mark style="color:blue;">**Blue Color:**</mark>     Events that only trigger on the <mark style="color:blue;">**Clients**</mark> ![](https://3009462755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNG75ky1pR1kRokWLRnzy%2Fuploads%2FZuSV6eY2AZOLsfbmCdiT%2FScreenshot%202025-04-19%20230214.png?alt=media\&token=c08e558b-15bc-4b80-9c3b-9d81384a99ce)

<mark style="color:yellow;">**Yellow Color:**</mark>  Triggered on both <mark style="color:yellow;">**Server**</mark> and <mark style="color:yellow;">**Clients**</mark> ![](https://3009462755-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNG75ky1pR1kRokWLRnzy%2Fuploads%2FgrxyckVxtAjcBpst2wav%2Fimage.png?alt=media\&token=55829948-5871-4286-8e0a-bd3e7dfc6f0d)

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.
