Update patch system

下载器增加取消方法。
pull/51/head
hevinci 2022-11-18 16:45:56 +08:00
parent 1cf03bf049
commit 1dab0f2b19
1 changed files with 13 additions and 0 deletions

View File

@ -226,6 +226,19 @@ namespace YooAsset
{
_isPause = false;
}
/// <summary>
/// 取消下载
/// </summary>
public void CancelDownload()
{
if (_steps != ESteps.Done)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "User cancel.";
}
}
}
public sealed class PackageDownloaderOperation : DownloaderOperation