Class ContentDownloadService
Class responsible for managing active content downloads.
Namespace: Unity.Entities.Content
Assembly: solution.dll
Syntax
public class ContentDownloadService
  Constructors
| Name | Description | 
|---|---|
| ContentDownloadService(string, string, int, int, Func<DownloadOperation>) | Construct a download service.  | 
      
Properties
| Name | Description | 
|---|---|
| CacheRoot | The root directory of the local cache.  | 
      
| Name | The download service name. Each service name must be unique.  | 
      
| Priority | The priority of the service. Higher values will place it at the front of the service list.  | 
      
| TotalBytes | Total bytes processed.  | 
      
| TotalDownloadedBytes | Total bytes downloaded.  | 
      
Methods
| Name | Description | 
|---|---|
| CanDownload(RemoteContentLocation) | Used to determine which download service to use to download content. Each service is checked in order until a servce returns true.  | 
      
| CancelDownload(RemoteContentLocation) | Called when a download needs to be cancelled. This is not guaranteed to cancel the operation.  | 
      
| ClearDownloadProgress() | Resets the download statistics.  | 
      
| ComputeCachePath(RemoteContentLocation) | Computes the local path of the content in the cache.  | 
      
| Dispose() | Release up internal resources  | 
      
| DownloadContent(in RemoteContentLocation) | Starts the process of downloading content.  | 
      
| GetDownloadProgress(RemoteContentLocation, ref long, ref long) | Gets the downlaod progress for a specific location.  | 
      
| GetDownloadStatus(in RemoteContentLocation) | Gets the download status for a specific location. If the content is cached, this will return a completed status even if the content was not explicitly requested.  | 
      
| GetLocalCacheFilePath(RemoteContentLocation, out string) | Gets the local cache file path for a location and checks to see if it exists.  | 
      
| OnAddedToDeliveryService(ContentDeliveryService) | Called when added to the content delivery service.  | 
      
| Process() | Processes active downloads and updates status.  |