docs.unity3d.com
    Show / Hide Table of Contents

    Method LoadSceneAsync

    LoadSceneAsync(Object, LoadSceneMode, Boolean, Int32)

    Loads an Addressable Scene asset.

    Declaration
    public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(object key, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100)
    Parameters
    Type Name Description
    Object key

    The key of the location of the scene to load.

    LoadSceneMode loadMode

    Scene load mode.

    Boolean activateOnLoad

    If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point.

    Int32 priority

    Async operation priority for scene loading.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    Remarks

    The loadMode, activateOnLoad, and priority parameters correspond to the parameters used in the Unity SceneManager.LoadSceneAsync method.

    See Loading Scenes for more details.

    LoadSceneAsync(Object, LoadSceneParameters, Boolean, Int32)

    Loads an Addressable Scene asset.

    Declaration
    public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(object key, LoadSceneParameters loadSceneParameters, bool activateOnLoad = true, int priority = 100)
    Parameters
    Type Name Description
    Object key

    The key of the location of the scene to load.

    LoadSceneParameters loadSceneParameters

    Scene load mode.

    Boolean activateOnLoad

    If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point.

    Int32 priority

    Async operation priority for scene loading.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    Remarks

    The loadSceneParameters, activateOnLoad, and priority parameters correspond to the parameters used in the Unity SceneManager.LoadSceneAsync method.

    See Loading Scenes for more details.

    LoadSceneAsync(IResourceLocation, LoadSceneMode, Boolean, Int32)

    Loads an Addressable Scene asset.

    Declaration
    public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(IResourceLocation location, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100)
    Parameters
    Type Name Description
    IResourceLocation location

    The location of the scene to load.

    LoadSceneMode loadMode

    Scene load mode.

    Boolean activateOnLoad

    If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point.

    Int32 priority

    Async operation priority for scene loading.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    Remarks

    The loadMode, activateOnLoad, and priority parameters correspond to the parameters used in the Unity SceneManager.LoadSceneAsync method.

    See Loading Scenes for more details.

    LoadSceneAsync(IResourceLocation, LoadSceneParameters, Boolean, Int32)

    Loads an Addressable Scene asset.

    Declaration
    public static AsyncOperationHandle<SceneInstance> LoadSceneAsync(IResourceLocation location, LoadSceneParameters loadSceneParameters, bool activateOnLoad = true, int priority = 100)
    Parameters
    Type Name Description
    IResourceLocation location

    The location of the scene to load.

    LoadSceneParameters loadSceneParameters

    Scene load parameters.

    Boolean activateOnLoad

    If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point.

    Int32 priority

    Async operation priority for scene loading.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    Remarks

    The loadSceneParameters, activateOnLoad, and priority parameters correspond to the parameters used in the Unity SceneManager.LoadSceneAsync method.

    See Loading Scenes for more details.

    In This Article
    • LoadSceneAsync(Object, LoadSceneMode, Boolean, Int32)
    • LoadSceneAsync(Object, LoadSceneParameters, Boolean, Int32)
    • LoadSceneAsync(IResourceLocation, LoadSceneMode, Boolean, Int32)
    • LoadSceneAsync(IResourceLocation, LoadSceneParameters, Boolean, Int32)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023