From 8725821a2705e3985e75085b1fdef3bd2e44c864 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 25 Aug 2023 20:15:58 +0800 Subject: [PATCH 1/3] update download system --- .../Downloader/FileGeneralDownloader.cs | 10 +++++++--- .../Downloader/FileResumeDownloader.cs | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs index c9fca2b4..5d737bf4 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileGeneralDownloader.cs @@ -51,6 +51,9 @@ namespace YooAsset // 准备下载 if (_steps == ESteps.PrepareDownload) { + // 获取请求地址 + _requestURL = GetRequestURL(); + // 重置变量 _downloadProgress = 0f; _downloadedBytes = 0; @@ -59,14 +62,16 @@ namespace YooAsset _isAbort = false; _latestDownloadBytes = 0; _latestDownloadRealtime = Time.realtimeSinceStartup; + + // 重置计时器 + if(_tryAgainTimer > 0f) + YooLogger.Warning($"Try again download : {_requestURL}"); _tryAgainTimer = 0f; // 删除临时文件 if (File.Exists(_tempFilePath)) File.Delete(_tempFilePath); - // 获取请求地址 - _requestURL = GetRequestURL(); _steps = ESteps.CreateDownloader; } @@ -197,7 +202,6 @@ namespace YooAsset _failedTryAgain--; _steps = ESteps.PrepareDownload; ReportWarning(); - YooLogger.Warning($"Try again download : {_requestURL}"); } } } diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs index 070f7c45..f117d14a 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/FileResumeDownloader.cs @@ -91,6 +91,9 @@ namespace YooAsset // 创建下载器 if (_steps == ESteps.PrepareDownload) { + // 获取请求地址 + _requestURL = GetRequestURL(); + // 重置变量 _downloadProgress = 0f; _downloadedBytes = 0; @@ -99,11 +102,13 @@ namespace YooAsset _isAbort = false; _latestDownloadBytes = 0; _latestDownloadRealtime = Time.realtimeSinceStartup; - _tryAgainTimer = 0f; _fileOriginLength = 0; - // 获取请求地址 - _requestURL = GetRequestURL(); + // 重置计时器 + if (_tryAgainTimer > 0f) + YooLogger.Warning($"Try again download : {_requestURL}"); + _tryAgainTimer = 0f; + _steps = ESteps.CreateDownloader; } @@ -257,7 +262,6 @@ namespace YooAsset _failedTryAgain--; _steps = ESteps.PrepareDownload; ReportWarning(); - YooLogger.Warning($"Try again download : {_requestURL}"); } } } From 09cf93d85272f46359178ddbb7542bdab5bc1ba5 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 25 Aug 2023 20:39:46 +0800 Subject: [PATCH 2/3] Update package.json --- Assets/YooAsset/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/YooAsset/package.json b/Assets/YooAsset/package.json index 58eda812..9f057942 100644 --- a/Assets/YooAsset/package.json +++ b/Assets/YooAsset/package.json @@ -1,7 +1,7 @@ { "name": "com.tuyoogame.yooasset", "displayName": "YooAsset", - "version": "1.5.3-preview", + "version": "1.5.4-preview", "unity": "2019.4", "description": "unity3d resources management system.", "author": { From 697a87721f19cac933e7994afd584ffc744c11f4 Mon Sep 17 00:00:00 2001 From: hevinci Date: Fri, 25 Aug 2023 20:39:53 +0800 Subject: [PATCH 3/3] Update CHANGELOG.md --- Assets/YooAsset/CHANGELOG.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Assets/YooAsset/CHANGELOG.md b/Assets/YooAsset/CHANGELOG.md index 312421af..d9f8ff66 100644 --- a/Assets/YooAsset/CHANGELOG.md +++ b/Assets/YooAsset/CHANGELOG.md @@ -2,6 +2,41 @@ All notable changes to this package will be documented in this file. +## [1.5.4-preview] - 2023-08-25 + +优化了资源清单文件构建速度(极大提升构建体验)(感谢yingnierxiao同学)。 + +### Fixed + +- (#130) 修复了打包路径无效问题bug +- (#138) 修复了Unity不支持的格式的原生文件会报warning + +### Added + +- 新增了IBuildinQueryServices 接口。 + +### Changed + +- 在开启可寻址模式下,默认支持通过资源路径加载资源对象。 + +- 优化了资源收集界面,增加了配置相关的警示提示。 + +- 优化了资源报告界面,增加了BundleView界面里的builtin资源的列表显示。 + +- IQueryServices接口变更为IBuildinQueryServices接口 + +- EOperationStatus增加了正在处理的状态。 + + ```c# + public enum EOperationStatus + { + None, + Processing, + Succeed, + Failed + } + ``` + ## [1.5.3-preview] - 2023-07-28 ### Fixed