Method LoadAssetsAsync
LoadAssetsAsync<TObject>(IList<IResourceLocation>, Action<TObject>)
Loads multiple assets, based on the list of locations provided.
선언
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(IList<IResourceLocation> locations, Action<TObject> callback)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IList<IResourceLocation> | locations | The locations of the assets. |
Action<TObject> | callback | Callback Action that is called per load operation. |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
When you load Addressable assets, the system:
- Gathers the dependencies of the asset
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
If any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The Status
of the operation handle is set to Failed and the Result
is set to null.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.
LoadAssetsAsync<TObject>(IList<IResourceLocation>, Action<TObject>, bool)
Loads multiple assets, based on the list of locations provided.
선언
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(IList<IResourceLocation> locations, Action<TObject> callback, bool releaseDependenciesOnFailure)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IList<IResourceLocation> | locations | The locations of the assets. |
Action<TObject> | callback | Callback Action that is called per load operation. |
bool | releaseDependenciesOnFailure | If all matching locations succeed, this parameter is ignored.
When true, if any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The When false, if any matching location fails, the When |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
When you load Addressable assets, the system:
- Gathers the dependencies of the assets
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
If any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The Status
of the operation handle is set to Failed and the Result
is set to null.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.
LoadAssetsAsync<TObject>(IList<object>, Action<TObject>, MergeMode)
Loads multiple assets identified by a list of keys.
선언
[Obsolete]
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(IList<object> keys, Action<TObject> callback, Addressables.MergeMode mode)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IList<object> | keys | List of keys for the locations. |
Action<TObject> | callback | Callback Action that is called per load operation. |
Addressables.MergeMode | mode | Method for merging the results of key matches. See Addressables.MergeMode for specifics |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
The keys in keys
are translated into lists of locations, which are merged into a single list based on
the value in mode
.
When you load Addressable assets, the system:
- Gathers the dependencies of the assets
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
If any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The Status
of the operation handle is set to Failed and the Result
is set to null.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.
LoadAssetsAsync<TObject>(IEnumerable, Action<TObject>, MergeMode)
Loads multiple assets identified by a list of keys.
선언
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(IEnumerable keys, Action<TObject> callback, Addressables.MergeMode mode)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IEnumerable | keys | List of keys for the locations. |
Action<TObject> | callback | Callback Action that is called per load operation. |
Addressables.MergeMode | mode | Method for merging the results of key matches. See Addressables.MergeMode for specifics |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
The keys in keys
are translated into lists of locations, which are merged into a single list based on
the value in mode
.
When you load Addressable assets, the system:
- Gathers the dependencies of the assets
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
If any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The Status
of the operation handle is set to Failed and the Result
is set to null.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.
LoadAssetsAsync<TObject>(IList<object>, Action<TObject>, MergeMode, bool)
Load multiple assets. Each key in the provided list will be translated into a list of locations. Those many lists will be combined down to one based on the provided MergeMode. See the Loading Addressable Assets documentation for more details.
선언
[Obsolete]
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(IList<object> keys, Action<TObject> callback, Addressables.MergeMode mode, bool releaseDependenciesOnFailure)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IList<object> | keys | IEnumerable set of keys for the locations. |
Action<TObject> | callback | Callback Action that is called per load operation. |
Addressables.MergeMode | mode | Method for merging the results of key matches. See Addressables.MergeMode for specifics |
bool | releaseDependenciesOnFailure | If all matching locations succeed, this parameter is ignored. When true, if any matching location fails, all loads and dependencies will be released. The returned .Result will be null, and .Status will be Failed. When false, if any matching location fails, the returned .Result will be an IList of size equal to the number of locations attempted. Any failed location will correlate to a null in the IList, while successful loads will correlate to a TObject in the list. The .Status will still be Failed. When true, op does not need to be released if anything fails, when false, it must always be released. |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
LoadAssetsAsync<TObject>(IEnumerable, Action<TObject>, MergeMode, bool)
Loads multiple assets, identified by a set of keys.
선언
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(IEnumerable keys, Action<TObject> callback, Addressables.MergeMode mode, bool releaseDependenciesOnFailure)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IEnumerable | keys | IEnumerable set of keys for the locations. |
Action<TObject> | callback | Callback Action that is called per load operation. |
Addressables.MergeMode | mode | Method for merging the results of key matches. See Addressables.MergeMode for specifics |
bool | releaseDependenciesOnFailure | If all matching locations succeed, this parameter is ignored. When true, if any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The When false, if any matching location fails, the When |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
The keys in keys
are translated into lists of locations, which are merged into a single list based on
the value in mode
.
When you load Addressable assets, the system:
- Gathers the dependencies of the assets
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
If any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The Status
of the operation handle is set to Failed and the Result
is set to null.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.
LoadAssetsAsync<TObject>(object, Action<TObject>)
Loads multiple assets identified by a single key.
선언
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(object key, Action<TObject> callback)
파라미터
타입 | 이름 | 설명 |
---|---|---|
object | key | Key for the locations. |
Action<TObject> | callback | Callback Action that is called per load operation. |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
The key in key
is translated into a list of locations that are then loaded.
When you load Addressable assets, the system:
- Gathers the dependencies of the assets
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
If any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The Status
of the operation handle is set to Failed and the Result
is set to null.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.
LoadAssetsAsync<TObject>(object, Action<TObject>, bool)
Loads multiple assets identified by a single key.
선언
public static AsyncOperationHandle<IList<TObject>> LoadAssetsAsync<TObject>(object key, Action<TObject> callback, bool releaseDependenciesOnFailure)
파라미터
타입 | 이름 | 설명 |
---|---|---|
object | key | Key for the locations. |
Action<TObject> | callback | Callback Action that is called per load operation (per loaded asset). |
bool | releaseDependenciesOnFailure | If all matching locations succeed, this parameter is ignored. When true, if any assets cannot be loaded, the entire operation fails. The operation releases any assets and dependencies it had already loaded.
The When false, if any matching location fails, the When |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | The operation handle for the request. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | The type of the assets. |
참고
The key in key
is translated into a list of locations that are then loaded.
When you load Addressable assets, the system:
- Gathers the dependencies of the assets
- Downloads any remote AssetBundles needed to load the assets or their dependencies
- Loads the AssetBundles into memory
- Populates the
Result
object of the AsyncOperationHandle<TObject> instance returned by this function
Use the Result
object to access the loaded assets.
See the Loading Addressable Assets documentation for more details.
See Operations for information on handling the asynchronous operations used to load Addressable assets.