Google. Play. AssetDelivery. PlayAssetBundleRequest
This is an abstract class.A CustomYieldInstruction used to monitor the asynchronous retrieval of an asset pack containing an AssetBundle.
Summary
Inheritance
Inherits from: CustomYieldInstruction
Properties |
|
---|---|
AssetBundle
|
AssetBundle
The AssetBundle loaded by this request.
|
DownloadProgress
|
float
Progress between 0 and 1 indicating the overall download progress of this request.
|
Error
|
The error that prevented this requested from completing successfully.
|
IsDone
|
bool
Returns true if this request is in the AssetDeliveryStatus.Loaded or AssetDeliveryStatus.Failed status, false otherwise.
|
Status
|
An enum indicating the status of this request (downloading, downloaded, installed etc.) If the request completed successfully, this value should be AssetDeliveryStatus.Loaded.
|
keepWaiting
|
override bool
Implements the CustomYieldInstruction.keepWaiting property so that this request can be yielded on in a coroutine.
|
Events |
|
---|---|
Completed = delegate { }
|
Action< PlayAssetBundleRequest >
Event indicating that the request is completed.
|
Public functions |
|
---|---|
AttemptCancel()
|
virtual abstract void
Cancels the request if possible, setting Status to AssetDeliveryStatus.Failed and Error to AssetDeliveryErrorCode.Canceled.
|
Protected functions |
|
---|---|
InvokeCompletedEvent()
|
void
Invokes the Completed event.
|
Properties
AssetBundle
AssetBundle AssetBundle
The AssetBundle loaded by this request.
This corresponds to the AssetBundle name passed into this request. If Status is not AssetDeliveryStatus.Loaded, this value is null.
DownloadProgress
float DownloadProgress
Progress between 0 and 1 indicating the overall download progress of this request.
Note: If this value is equal to 1, it does not mean that the request has completed, only that the Downloading stage is finished.
Error
AssetDeliveryErrorCode Error
The error that prevented this requested from completing successfully.
In the case of a successful request, this will always be AssetDeliveryErrorCode.NoError.
IsDone
bool IsDone
Returns true if this request is in the AssetDeliveryStatus.Loaded or AssetDeliveryStatus.Failed status, false otherwise.
Status
AssetDeliveryStatus Status
An enum indicating the status of this request (downloading, downloaded, installed etc.) If the request completed successfully, this value should be AssetDeliveryStatus.Loaded.
If an error occured, it should be AssetDeliveryStatus.Failed.
keepWaiting
override bool keepWaiting
Implements the CustomYieldInstruction.keepWaiting property so that this request can be yielded on in a coroutine.
Events
Completed
Action< PlayAssetBundleRequest > Completed = delegate { }
Event indicating that the request is completed.
If an event handler is registered after the operation has completed, and thus after this event has been invoked, then the handler will be called synchronously.
Public functions
AttemptCancel
virtual abstract void AttemptCancel()
Cancels the request if possible, setting Status to AssetDeliveryStatus.Failed and Error to AssetDeliveryErrorCode.Canceled.
If the request is already AssetDeliveryStatus.Loading, AssetDeliveryStatus.Loaded or AssetDeliveryStatus.Failed, then the request is left unchanged.