UnloadAsync()
Begin an asynchronous unload of the ContentFile.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.Loading
- Assembly: UnityEngine.ContentLoadModule
public ContentFileUnloadHandle UnloadAsync()
Returns
Type | Description |
|---|---|
| ContentFileUnloadHandle | A handle that can be used to track the status of the unload operation. |
Remarks
If you call this while a load is in progress, it will attempt to cancel the loading process.
This must be called in order to release resources, even when the ContentFile load operation was not successful.
An exception will be thrown if this ContentFile is being used as a dependency by another ContentFile. In this case, the other file must be unloaded first.