docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method ProvideScene

    ProvideScene(ISceneProvider, IResourceLocation, LoadSceneMode, bool, int)

    Load a scene at a specificed resource location.

    Declaration
    public AsyncOperationHandle<SceneInstance> ProvideScene(ISceneProvider sceneProvider, IResourceLocation location, LoadSceneMode loadSceneMode, bool activateOnLoad, int priority)
    Parameters
    Type Name Description
    ISceneProvider sceneProvider

    The scene provider instance.

    IResourceLocation location

    The location of the scene.

    LoadSceneMode loadSceneMode

    The load mode for the scene.

    bool activateOnLoad

    If false, the scene will be loaded in the background and not activated when complete.

    int priority

    The priority for the load operation.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    Async operation handle that will complete when the scene is loaded. If activateOnLoad is false, then Activate() will need to be called on the SceneInstance returned.

    ProvideScene(ISceneProvider, IResourceLocation, LoadSceneParameters, bool, int)

    Load a scene at a specificed resource location.

    Declaration
    public AsyncOperationHandle<SceneInstance> ProvideScene(ISceneProvider sceneProvider, IResourceLocation location, LoadSceneParameters loadSceneParameters, bool activateOnLoad, int priority)
    Parameters
    Type Name Description
    ISceneProvider sceneProvider

    The scene provider instance.

    IResourceLocation location

    The location of the scene.

    LoadSceneParameters loadSceneParameters

    The load parameters for the scene.

    bool activateOnLoad

    If false, the scene will be loaded in the background and not activated when complete.

    int priority

    The priority for the load operation.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    Async operation handle that will complete when the scene is loaded. If activateOnLoad is false, then Activate() will need to be called on the SceneInstance returned.

    ProvideScene(ISceneProvider, IResourceLocation, LoadSceneParameters, SceneReleaseMode, bool, int)

    Load a scene at a specificed resource location.

    Declaration
    public AsyncOperationHandle<SceneInstance> ProvideScene(ISceneProvider sceneProvider, IResourceLocation location, LoadSceneParameters loadSceneParameters, SceneReleaseMode releaseMode, bool activateOnLoad, int priority)
    Parameters
    Type Name Description
    ISceneProvider sceneProvider

    The scene provider instance.

    IResourceLocation location

    The location of the scene.

    LoadSceneParameters loadSceneParameters

    The load parameters for the scene.

    SceneReleaseMode releaseMode

    How the scene is handled if it is unloaded due to another scene loading using single mode.

    bool activateOnLoad

    If false, the scene will be loaded in the background and not activated when complete.

    int priority

    The priority for the load operation.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    Async operation handle that will complete when the scene is loaded. If activateOnLoad is false, then Activate() will need to be called on the SceneInstance returned.

    In This Article
    Back to top
    Copyright © 2024 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)