docs.unity3d.com
    Show / Hide Table of Contents

    Method ProvideScene

    ProvideScene(ISceneProvider, IResourceLocation, LoadSceneMode, Boolean, Int32)

    Load a scene at a specificed resource location.

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

    The scene provider instance.

    IResourceLocation location

    The location of the scene.

    LoadSceneMode loadMode

    The load mode for the scene.

    Boolean activateOnLoad

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

    Int32 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.

    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