docs.unity3d.com
    Show / Hide Table of Contents

    Method ReleaseInstance

    ReleaseInstance(GameObject)

    Releases and destroys an object that was created via Addressables.InstantiateAsync.

    Declaration
    public static bool ReleaseInstance(GameObject instance)
    Parameters
    Type Name Description
    GameObject instance

    The GameObject instance to be released and destroyed.

    Returns
    Type Description
    Boolean

    Returns true if the instance was successfully released.

    ReleaseInstance(AsyncOperationHandle)

    Releases and destroys an object that was created via Addressables.InstantiateAsync.

    Declaration
    public static bool ReleaseInstance(AsyncOperationHandle handle)
    Parameters
    Type Name Description
    AsyncOperationHandle handle

    The handle to the game object to destroy, that was returned by InstantiateAsync.

    Returns
    Type Description
    Boolean

    Returns true if the instance was successfully released.

    ReleaseInstance(AsyncOperationHandle<GameObject>)

    Releases and destroys an object that was created via Addressables.InstantiateAsync.

    Declaration
    public static bool ReleaseInstance(AsyncOperationHandle<GameObject> handle)
    Parameters
    Type Name Description
    AsyncOperationHandle<GameObject> handle

    The handle to the game object to destroy, that was returned by InstantiateAsync.

    Returns
    Type Description
    Boolean

    Returns true if the instance was successfully released.

    In This Article
    • ReleaseInstance(GameObject)
    • ReleaseInstance(AsyncOperationHandle)
    • ReleaseInstance(AsyncOperationHandle<GameObject>)
    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