docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NetworkSceneManager

    Main class for managing network scenes

    Inheritance
    object
    NetworkSceneManager
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)