Class NetworkSceneManager
Main class for managing network scenes
Inherited Members
Namespace: MLAPI.SceneManagement
Assembly: Unity.Multiplayer.MLAPI.Runtime.dll
Syntax
public static class NetworkSceneManager
Methods
AddRuntimeSceneName(string, uint)
Adds a scene during runtime. The index is REQUIRED to be unique AND the same across all instances.
Declaration
public static void AddRuntimeSceneName(string sceneName, uint index)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sceneName | Scene name. |
| uint | index | Index. |
SwitchScene(string)
Switches to a scene with a given name. Can only be called from Server
Declaration
public static SceneSwitchProgress SwitchScene(string sceneName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sceneName | The name of the scene to switch to |
Returns
| Type | Description |
|---|---|
| SceneSwitchProgress |
Events
OnSceneSwitchStarted
Event that is invoked when a local scene switch has started
Declaration
public static event NetworkSceneManager.SceneSwitchStartedDelegate OnSceneSwitchStarted
Event Type
| Type | Description |
|---|---|
| NetworkSceneManager.SceneSwitchStartedDelegate |
OnSceneSwitched
Event that is invoked when the scene is switched
Declaration
public static event NetworkSceneManager.SceneSwitchedDelegate OnSceneSwitched
Event Type
| Type | Description |
|---|---|
| NetworkSceneManager.SceneSwitchedDelegate |