docs.unity3d.com
    Show / Hide Table of Contents

    Method UnloadScene

    UnloadScene(SceneInstance, Boolean)

    Release scene

    Declaration
    [Obsolete]
    public static AsyncOperationHandle<SceneInstance> UnloadScene(SceneInstance scene, bool autoReleaseHandle = true)
    Parameters
    Type Name Description
    SceneInstance scene

    The SceneInstance to release.

    Boolean autoReleaseHandle

    If true, the handle will be released automatically when complete.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    UnloadScene(AsyncOperationHandle, Boolean)

    Release scene

    Declaration
    [Obsolete]
    public static AsyncOperationHandle<SceneInstance> UnloadScene(AsyncOperationHandle handle, bool autoReleaseHandle = true)
    Parameters
    Type Name Description
    AsyncOperationHandle handle

    The handle returned by LoadSceneAsync for the scene to release.

    Boolean autoReleaseHandle

    If true, the handle will be released automatically when complete.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    UnloadScene(AsyncOperationHandle<SceneInstance>, Boolean)

    Release scene

    Declaration
    [Obsolete]
    public static AsyncOperationHandle<SceneInstance> UnloadScene(AsyncOperationHandle<SceneInstance> handle, bool autoReleaseHandle = true)
    Parameters
    Type Name Description
    AsyncOperationHandle<SceneInstance> handle

    The handle returned by LoadSceneAsync for the scene to release.

    Boolean autoReleaseHandle

    If true, the handle will be released automatically when complete.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    UnloadScene(AsyncOperationHandle<SceneInstance>, UnloadSceneOptions, Boolean)

    Release scene

    Declaration
    [Obsolete]
    public static AsyncOperationHandle<SceneInstance> UnloadScene(AsyncOperationHandle<SceneInstance> handle, UnloadSceneOptions unloadOptions, bool autoReleaseHandle = true)
    Parameters
    Type Name Description
    AsyncOperationHandle<SceneInstance> handle

    The handle returned by LoadSceneAsync for the scene to release.

    UnloadSceneOptions unloadOptions

    If true, assets embedded in the scene will be unloaded as part of the scene unload process.

    Boolean autoReleaseHandle

    If true, the handle will be released automatically when complete.

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    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