跳到主要内容
版本:2.3.x

Class PreDownloadContentOperation

Assembly: YooAsset.dll​
Declaration
public sealed class PreDownloadContentOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>

Methods​

CreateResourceDownloader(int, int)​

创建资源下载器,用于下载当前资源版本所有的资源包文件

Declaration
public ResourceDownloaderOperation CreateResourceDownloader(int downloadingMaxNumber, int failedTryAgain)
Returns​

YooAsset.ResourceDownloaderOperation

Parameters​
TypeNameDescription
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数

CreateResourceDownloader(string, int, int)​

创建资源下载器,用于下载指定的资源标签关联的资源包文件

Declaration
public ResourceDownloaderOperation CreateResourceDownloader(string tag, int downloadingMaxNumber, int failedTryAgain)
Returns​

YooAsset.ResourceDownloaderOperation

Parameters​
TypeNameDescription
System.Stringtag资源标签
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数

CreateResourceDownloader(string[], int, int)​

创建资源下载器,用于下载指定的资源标签列表关联的资源包文件

Declaration
public ResourceDownloaderOperation CreateResourceDownloader(string[] tags, int downloadingMaxNumber, int failedTryAgain)
Returns​

YooAsset.ResourceDownloaderOperation

Parameters​
TypeNameDescription
System.String[]tags资源标签列表
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数

CreateBundleDownloader(string, bool, int, int)​

创建资源下载器,用于下载指定的资源依赖的资源包文件

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(string location, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
Returns​

YooAsset.ResourceDownloaderOperation

Parameters​
TypeNameDescription
System.Stringlocation资源定位地址
System.BooleanrecursiveDownload
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数

CreateBundleDownloader(string[], bool, int, int)​

创建资源下载器,用于下载指定的资源列表依赖的资源包文件

Declaration
public ResourceDownloaderOperation CreateBundleDownloader(string[] locations, bool recursiveDownload, int downloadingMaxNumber, int failedTryAgain)
Returns​

YooAsset.ResourceDownloaderOperation

Parameters​
TypeNameDescription
System.String[]locations资源定位地址列表
System.BooleanrecursiveDownload
System.Int32downloadingMaxNumber同时下载的最大文件数
System.Int32failedTryAgain下载失败的重试次数

Implements​

  • System.Collections.IEnumerator
  • System.IComparable<YooAsset.AsyncOperationBase>