Class SceneEvent
Used for local notifications of various scene events. The OnSceneEvent of
delegate type NetworkSceneManager.SceneEventDelegate uses this class to provide
scene event status.
Note: This is only when EnableSceneManagement is enabled.
*** Do not start new scene events within scene event notification callbacks.
See also:
SceneEventType
Namespace: Unity.Netcode
Syntax
public class SceneEvent
Fields
AsyncOperation
The AsyncOperation returned by SceneManager
This is set for the following SceneEventTypes:
Declaration
public AsyncOperation AsyncOperation
Field Value
Type | Description |
---|---|
AsyncOperation |
ClientId
The client identifier can vary depending upon the following conditions:
- SceneEventTypes that always set the ClientId
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 ClientId 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 ClientId to the ServerId:
Declaration
public ulong ClientId
Field Value
Type | Description |
---|---|
UInt64 |
ClientsThatCompleted
List of clients that completed a loading or unloading event.
This is set for the following SceneEventTypes:
Declaration
public List<ulong> ClientsThatCompleted
Field Value
Type | Description |
---|---|
List<UInt64> |
ClientsThatTimedOut
List of clients that timed out during a loading or unloading event.
This is set for the following SceneEventTypes:
Declaration
public List<ulong> ClientsThatTimedOut
Field Value
Type | Description |
---|---|
List<UInt64> |
LoadSceneMode
If applicable, this reflects the type of scene loading or unloading that is occurring.
This is set for the following SceneEventTypes:
Declaration
public LoadSceneMode LoadSceneMode
Field Value
Type | Description |
---|---|
LoadSceneMode |
Scene
When a scene is loaded, the Scene structure is returned.
This is set for the following SceneEventTypes:
Declaration
public Scene Scene
Field Value
Type | Description |
---|---|
Scene |
SceneEventType
Will always be set to the current SceneEventType
Declaration
public SceneEventType SceneEventType
Field Value
Type | Description |
---|---|
SceneEventType |
SceneName
This will be set to the scene name that the event pertains to.
This is set for the following SceneEventTypes:
Declaration
public string SceneName
Field Value
Type | Description |
---|---|
String |