Class SceneEvent
Used for local notifications of various scene events. The On
Note: This is only when Enable
*** Do not start new scene events within scene event notification callbacks.
See also:
Scene
Inherited Members
Namespace: Unity.Netcode
Assembly: Unity.Netcode.Runtime.dll
Syntax
public class SceneEvent
Fields
AsyncOperation
The Async
This is set for the following Scene
Declaration
public AsyncOperation AsyncOperation
Field Value
Type | Description |
---|---|
Async |
ClientId
The client identifier can vary depending upon the following conditions:
- Scene
Event s that always set the ClientType Id to the local client identifier, are initiated (and processed locally) by the server-host, and sent to all clients to be processed.
- Events that always set the Client
Id to the local client identifier, are initiated (and processed locally) by a client or server-host, and if initiated by a client will always be sent to and processed on the server-host: -
Events that always set the Client
Id to the ServerId:
Declaration
public ulong ClientId
Field Value
Type | Description |
---|---|
ulong |
ClientsThatCompleted
List of clients that completed a loading or unloading event.
This is set for the following Scene
Declaration
public List<ulong> ClientsThatCompleted
Field Value
ClientsThatTimedOut
List of clients that timed out during a loading or unloading event.
This is set for the following Scene
Declaration
public List<ulong> ClientsThatTimedOut
Field Value
LoadSceneMode
If applicable, this reflects the type of scene loading or unloading that is occurring.
This is set for the following Scene
Declaration
public LoadSceneMode LoadSceneMode
Field Value
Type | Description |
---|---|
Load |
Scene
When a scene is loaded, the Scene structure is returned.
This is set for the following Scene
Declaration
public Scene Scene
Field Value
Type | Description |
---|---|
Scene |
SceneEventType
Will always be set to the current Scene
Declaration
public SceneEventType SceneEventType
Field Value
Type | Description |
---|---|
Scene |
SceneName
This will be set to the scene name that the event pertains to.
This is set for the following Scene
Declaration
public string SceneName
Field Value
Type | Description |
---|---|
string |