Method ReleaseInstance
ReleaseInstance(GameObject)
Releases and destroys an object that was created via one of the overloads of InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean).
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 one of the overloads of InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean).
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 one of the overloads of InstantiateAsync(IResourceLocation, InstantiationParameters, Boolean).
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. |