mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
23 lines
1.2 KiB
Markdown
23 lines
1.2 KiB
Markdown
# Application Events Overview
|
|
|
|
General description of Application Events
|
|
|
|
- **OnStartHost**
|
|
This event is invoked when a host is started.
|
|
- **OnStartServer**
|
|
This is invoked for NetworkBehaviour objects when they become active on the server.
|
|
This could be triggered by NetworkServer.Listen() for objects in the Scene, or by NetworkServer.Spawn() for objects that are dynamically created.
|
|
This will be called for objects on a "host" as well as for object on a dedicated server.
|
|
- **OnStartClient**
|
|
Called on every NetworkBehaviour when it is activated on a client.
|
|
Objects on the host have this function called, as there is a local client on the host. The values of SyncVars on object are guaranteed to be initialized correctly with the latest state from the server when this function is called on the client.
|
|
- **OnStopServer**
|
|
This event is called when a server is stopped - including when a host is stopped.
|
|
- **OnStopClient**
|
|
This event is called when a client is stopped.
|
|
- **OnStopHost**
|
|
This hook is called when a host is stopped.
|
|
- **OnApplicationQuit**
|
|
Sent to all game objects before the application quits.
|
|
In the editor this is called when the user stops playmode.
|