Method ProvideResources
ProvideResources<TObject>(IList<IResourceLocation>, Action<TObject>)
Asynchronously load all objects in the given collection of locations
.
If any matching location fails, all loads and dependencies will be released. The returned .Result will be null, and .Status will be Failed.
선언
public AsyncOperationHandle<IList<TObject>> ProvideResources<TObject>(IList<IResourceLocation> locations, Action<TObject> callback = null)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IList<IResourceLocation> | locations | locations to load. |
Action<TObject> | callback | This callback will be invoked once for each object that is loaded. |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | An async operation that will complete when all individual async load operations are complete. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | Object type to load. |
ProvideResources<TObject>(IList<IResourceLocation>, bool, Action<TObject>)
Asynchronously load all objects in the given collection of locations
.
선언
public AsyncOperationHandle<IList<TObject>> ProvideResources<TObject>(IList<IResourceLocation> locations, bool releaseDependenciesOnFailure, Action<TObject> callback = null)
파라미터
타입 | 이름 | 설명 |
---|---|---|
IList<IResourceLocation> | locations | locations to load. |
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. |
Action<TObject> | callback | This callback will be invoked once for each object that is loaded. |
반환
타입 | 설명 |
---|---|
AsyncOperationHandle<IList<TObject>> | An async operation that will complete when all individual async load operations are complete. |
타입 파라미터
이름 | 설명 |
---|---|
TObject | Object type to load. |