Method DownloadDependenciesAsync
DownloadDependenciesAsync(Object, Boolean)
Downloads dependencies of assets identified with the specified label or address.
Declaration
public static AsyncOperationHandle DownloadDependenciesAsync(object key, bool autoReleaseHandle = false)
Parameters
Type | Name | Description |
---|---|---|
Object | key | The key of the assets to load dependencies for. |
Boolean | autoReleaseHandle | If true, the Addressables system automatically releases the handle on completion. |
Returns
Type | Description |
---|---|
AsyncOperationHandle | The AsyncOperationHandle for the dependency load operation. |
Remarks
Call this function to make sure that the dependencies of assets you plan to load in performance-critical sections of code are downloaded and available beforehand.
You can use the AsyncOperationHandle returned by this function to monitor and provide feedback on the download progress.
See Preloading dependencies for more details.
DownloadDependenciesAsync(IList<IResourceLocation>, Boolean)
Downloads dependencies of assets at the specified locations.
Declaration
public static AsyncOperationHandle DownloadDependenciesAsync(IList<IResourceLocation> locations, bool autoReleaseHandle = false)
Parameters
Type | Name | Description |
---|---|---|
IList<IResourceLocation> | locations | The locations of the assets. |
Boolean | autoReleaseHandle | If true, the Addressables system automatically releases the handle on completion. |
Returns
Type | Description |
---|---|
AsyncOperationHandle | The AsyncOperationHandle for the dependency load. |
Remarks
Call this function to make sure that the dependencies of assets you plan to load in performance-critical sections of code are downloaded and available beforehand.
You can use the AsyncOperationHandle returned by this function to monitor and provide feedback on the download progress.
See Preloading dependencies for more details.
DownloadDependenciesAsync(IList<Object>, Addressables.MergeMode, Boolean)
Downloads dependencies of assets marked with the specified labels or addresses. See the DownloadDependenciesAsync documentation for more details.
Declaration
[Obsolete]
public static AsyncOperationHandle DownloadDependenciesAsync(IList<object> keys, Addressables.MergeMode mode, bool autoReleaseHandle = false)
Parameters
Type | Name | Description |
---|---|---|
IList<Object> | keys | List of keys for the locations. |
Addressables.MergeMode | mode | Method for merging the results of key matches. See Addressables.MergeMode for specifics |
Boolean | autoReleaseHandle | Automatically releases the handle on completion |
Returns
Type | Description |
---|---|
AsyncOperationHandle | The AsyncOperationHandle for the dependency load. |
DownloadDependenciesAsync(IEnumerable, Addressables.MergeMode, Boolean)
Downloads dependencies of assets identified by a list of keys.
Declaration
public static AsyncOperationHandle DownloadDependenciesAsync(IEnumerable keys, Addressables.MergeMode mode, bool autoReleaseHandle = false)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable | keys | List of keys for the locations. |
Addressables.MergeMode | mode | Method for merging the results of key matches. See Addressables.MergeMode for specifics |
Boolean | autoReleaseHandle | If true, the Addressables system automatically releases the handle on completion. |
Returns
Type | Description |
---|---|
AsyncOperationHandle | The AsyncOperationHandle for the dependency load operation. |
Remarks
The keys in keys
are translated into lists of locations, which are merged into a single list based on
the value in mode
.
Call this function to make sure that the dependencies of assets you plan to load in performance-critical sections of code are downloaded and available beforehand.
You can use the AsyncOperationHandle returned by this function to monitor and provide feedback on the download progress.
See Preloading dependencies for more details.