Google. Play. AssetDelivery. PlayAssetBundleRequest
This is an abstract class.An object used to monitor the asynchronous retrieval of an asset pack containing an AssetBundle via the Play Asset Delivery system.
Summary
Inheritance
Inherits from: CustomYieldInstruction
Properties |
|
---|---|
AssetBundle
|
AssetBundle
The AssetBundle loaded by this request.
|
DownloadProgress
|
float
Progress between 0.0f and 1.0f 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 CustomYieldInstruction's keepWaiting method, so that this request can be yielded on, in a coroutine, until it is done.
|
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.0f and 1.0f indicating the overall download progress of this request.
Note: If this value is equal to 1.0f, 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 CustomYieldInstruction's keepWaiting method, so that this request can be yielded on, in a coroutine, until it is done.
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.