diff --git a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs index 8204565..b69fa57 100644 --- a/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs +++ b/Assets/YooAsset/Runtime/PatchSystem/Operations/UpdatePackageOperation.cs @@ -8,11 +8,11 @@ namespace YooAsset public abstract class UpdatePackageOperation : AsyncOperationBase { /// - /// 开始下载 + /// 创建包裹下载器 /// /// 同时下载的最大文件数 /// 下载失败的重试次数 - public abstract PackageDownloaderOperation BeginDownloadPackage(int downloadingMaxNumber, int failedTryAgain); + public abstract PackageDownloaderOperation CreatePackageDownloader(int downloadingMaxNumber, int failedTryAgain); } /// @@ -29,13 +29,12 @@ namespace YooAsset } /// - /// 开始下载 + /// 创建包裹下载器 /// - public override PackageDownloaderOperation BeginDownloadPackage(int downloadingMaxNumber, int failedTryAgain) + public override PackageDownloaderOperation CreatePackageDownloader(int downloadingMaxNumber, int failedTryAgain) { List downloadList = new List(); var operation = new PackageDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain); - operation.BeginDownload(); return operation; } } @@ -54,13 +53,12 @@ namespace YooAsset } /// - /// 开始下载 + /// 创建包裹下载器 /// - public override PackageDownloaderOperation BeginDownloadPackage(int downloadingMaxNumber, int failedTryAgain) + public override PackageDownloaderOperation CreatePackageDownloader(int downloadingMaxNumber, int failedTryAgain) { List downloadList = new List(); var operation = new PackageDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain); - operation.BeginDownload(); return operation; } } @@ -143,22 +141,20 @@ namespace YooAsset } /// - /// 开始下载 + /// 创建包裹下载器 /// - public override PackageDownloaderOperation BeginDownloadPackage(int downloadingMaxNumber, int failedTryAgain) + public override PackageDownloaderOperation CreatePackageDownloader(int downloadingMaxNumber, int failedTryAgain) { if (Status == EOperationStatus.Succeed) { List downloadList = GetDownloadList(); var operation = new PackageDownloaderOperation(downloadList, downloadingMaxNumber, failedTryAgain); - operation.BeginDownload(); return operation; } else { YooLogger.Error($"{nameof(UpdatePackageOperation)} status is failed !"); var operation = new PackageDownloaderOperation(null, downloadingMaxNumber, failedTryAgain); - operation.BeginDownload(); return operation; } }