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

Class DownloaderOperation

Assembly: YooAsset.dll
Declaration
public abstract class DownloaderOperation : AsyncOperationBase, IEnumerator, IComparable<AsyncOperationBase>

Properties

TotalDownloadCount

统计的下载文件总数量

Declaration
public int TotalDownloadCount { get; }

TotalDownloadBytes

统计的下载文件的总大小

Declaration
public long TotalDownloadBytes { get; }

CurrentDownloadCount

当前已经完成的下载总数量

Declaration
public int CurrentDownloadCount { get; }

CurrentDownloadBytes

当前已经完成的下载总大小

Declaration
public long CurrentDownloadBytes { get; }

DownloadFinishCallback

当下载器结束(无论成功或失败)

Declaration
public DownloaderOperation.DownloaderFinish DownloadFinishCallback { get; set; }

DownloadUpdateCallback

当下载进度发生变化

Declaration
public DownloaderOperation.DownloadUpdate DownloadUpdateCallback { get; set; }

DownloadErrorCallback

当下载器发生错误

Declaration
public DownloaderOperation.DownloadError DownloadErrorCallback { get; set; }

DownloadFileBeginCallback

当开始下载某个文件

Declaration
public DownloaderOperation.DownloadFileBegin DownloadFileBeginCallback { get; set; }

Methods

Combine(DownloaderOperation)

合并其它下载器

Declaration
public void Combine(DownloaderOperation downloader)
Parameters
TypeNameDescription
YooAsset.DownloaderOperationdownloader合并的下载器

BeginDownload()

开始下载

Declaration
public void BeginDownload()

PauseDownload()

暂停下载

Declaration
public void PauseDownload()

ResumeDownload()

恢复下载

Declaration
public void ResumeDownload()

CancelDownload()

取消下载

Declaration
public void CancelDownload()

Implements

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