docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method UnloadScene

    UnloadScene(SceneInstance, bool)

    Release scene

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

    The SceneInstance to release.

    bool autoReleaseHandle

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

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    See Also
    UnloadSceneAsync(SceneInstance, bool)
    Synchronous Addressables

    UnloadScene(AsyncOperationHandle, bool)

    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.

    bool autoReleaseHandle

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

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    See Also
    UnloadSceneAsync(AsyncOperationHandle, bool)
    Synchronous Addressables

    UnloadScene(AsyncOperationHandle<SceneInstance>, bool)

    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.

    bool autoReleaseHandle

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

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    See Also
    UnloadSceneAsync(AsyncOperationHandle<SceneInstance>, bool)
    Synchronous Addressables

    UnloadScene(AsyncOperationHandle<SceneInstance>, UnloadSceneOptions, bool)

    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

    Specify behavior for unloading embedded scene objecs

    bool autoReleaseHandle

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

    Returns
    Type Description
    AsyncOperationHandle<SceneInstance>

    The operation handle for the request.

    See Also
    UnloadSceneAsync(SceneInstance, UnloadSceneOptions, bool)
    Synchronous Addressables
    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)