From cdc5bcd31f48709cff014dff23f4692197f925f3 Mon Sep 17 00:00:00 2001 From: hevinci Date: Thu, 29 Dec 2022 14:23:16 +0800 Subject: [PATCH] fix #56 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复更新资源清单错误计算超时时间的问题。 --- .../YooAsset/Runtime/DownloadSystem/UnityWebFileRequester.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/YooAsset/Runtime/DownloadSystem/UnityWebFileRequester.cs b/Assets/YooAsset/Runtime/DownloadSystem/UnityWebFileRequester.cs index 9277324..c85ed1a 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/UnityWebFileRequester.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/UnityWebFileRequester.cs @@ -36,6 +36,9 @@ namespace YooAsset { URL = url; _timeout = timeout; + _latestDownloadBytes = 0; + _latestDownloadRealtime = Time.realtimeSinceStartup; + _webRequest = new UnityWebRequest(URL, UnityWebRequest.kHttpVerbGET); DownloadHandlerFile handler = new DownloadHandlerFile(savePath); handler.removeFileOnAbort = true;