Class ContentDeliveryService
This class handles the overall process of delivering remote content to the client device. ContentLocationServices are used to resolve RemoteContentId into RemoteContentLocations. The ContentDownloadService is used to download the data described by the RemoteContentLocations.
Namespace: Unity.Entities.Content
Assembly: Unity.Entities.dll
Syntax
public class ContentDeliveryService
Constructors
Name | Description |
---|---|
ContentDeliveryService() | Construct a new delivery service. In order to be functional, at least 1 locations service and 1 download service must be added. |
Properties
Name | Description |
---|---|
DownloadServices | Enumeration of download services. |
LocationServices | Enumeration of location services. |
Methods
Name | Description |
---|---|
AccumulateContentSize(ref int, ref long, ref long, ref long) | Computes the size of content. |
AccumulateContentSize(in FixedString512Bytes, ref int, ref long, ref long, ref long) | Computes the size of the content set specified. |
AccumulateDownloadStats(in RemoteContentId, ref long, ref long) | Get the download statistics for a specified remote content id. |
AddDownloadService(ContentDownloadService) | Adds a download service. The priority of the service will be used to set the order. If there is another service with the same priority, the priority of the service added will be increased until it can be added. When added, OnAddedToDeliveryService will be called on the service. If there is a service with the same name, the existing service will be replaced with the passed in service. |
AddLocationService(ContentLocationService) | Adds a location service. The priority of the service will be used to set the order. If there is another service with the same priority, the priority of the service added will be increased until it can be added. When added, OnAddedToDeliveryService will be called on the service. |
CancelAllDeliveries() | Cancels all active downloads. This also marks all completed downloads as cancelled as well. This will force any previously completed downloads to restart. |
CancelDelivery(in RemoteContentId) | Cancel an in progress download. This will remove the download state and attempt to cancel the download if it is still inprogress or queued. If the download has already completed, the cached data will not be removed. |
CleanCache() | Clears any data from the cache directory that is not referenced by a location service. |
DeliverContent(string, Hash128, long, uint) | Starts the process of delivering content based on its location. |
DeliverContent(in FixedString512Bytes) | Delivers a named content set. |
DeliverContent(in UnsafeList<RemoteContentId>) | Starts the delivery process of a set of contents. |
DeliverContent(RemoteContentId*, int) | Downloads multiple files as a single set. |
DeliverContent(in RemoteContentId) | Starts the delivery process for content identified by the remote content id. |
DeliverContent(in RemoteContentLocation) | Starts the process of delivering content based on its location. |
Dispose() | Free internal resources. |
GetDeliveryStatus(in RemoteContentId) | Gets the delivery status of a remote id. If the id refers to a single delivery, the status returned will be for that id. If it refers to a set of deliveries, the status will be aggregated to the lowest value of the set. |
GetDeliveryStatus(in RemoteContentId, ref NativeList<DeliveryStatus>) | Gets the delivery status of a remote id. This version of this method should be used when retrieving the id of a set of downloads. |
Process() | Process active content deliveries. |
RemapContentPath(string) | Remaps the orignal content path to the path of the content in the local cache. |