mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
ae717810c0
It used to mention it being called on the server, which is false
19 lines
1.1 KiB
Markdown
19 lines
1.1 KiB
Markdown
# Client Events Overview
|
|
|
|
General description of Client Events
|
|
|
|
- **OnClientConnect**
|
|
Called on the client when it connects.
|
|
Mirror calls this on the client when it connects to the Server. Use an override to tell the NetworkManager what to do when the client connects to a server.
|
|
- **OnClientDisconnect**
|
|
Called on clients when disconnected from a server.
|
|
This is called on the client when it disconnects from the server. Override this function to decide what happens when the client disconnects.
|
|
- **OnClientNotReady**
|
|
Called on clients when a servers tells the client it is no longer ready.
|
|
This is commonly used when switching Scenes.
|
|
- **OnClientSceneChanged**
|
|
Called on clients when a Scene has completed loading, when the Scene load was initiated by the server.
|
|
Scene changes can cause player objects to be destroyed. The default implementation of OnClientSceneChanged in the NetworkManager is to add a player object for the connection if no player object exists.
|
|
- **OnClientError**
|
|
Called on clients when a network error occurs.
|