From ad9bdc65749907c8003652de90e9c07bf07f7d5b Mon Sep 17 00:00:00 2001 From: hevinci Date: Tue, 25 Jul 2023 18:37:43 +0800 Subject: [PATCH] update download system --- .../Runtime/DownloadSystem/Downloader/WebDownloader.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs index d4a1f70..3464457 100644 --- a/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs +++ b/Assets/YooAsset/Runtime/DownloadSystem/Downloader/WebDownloader.cs @@ -72,14 +72,18 @@ namespace YooAsset { uint crc = _bundleInfo.Bundle.UnityCRC; _downloadhandler = new DownloadHandlerAssetBundle(_requestURL, crc); +#if UNITY_2020_3_OR_NEWER _downloadhandler.autoLoadAssetBundle = false; +#endif } else { uint crc = _bundleInfo.Bundle.UnityCRC; var hash = Hash128.Parse(_bundleInfo.Bundle.FileHash); _downloadhandler = new DownloadHandlerAssetBundle(_requestURL, hash, crc); +#if UNITY_2020_3_OR_NEWER _downloadhandler.autoLoadAssetBundle = false; +#endif } _webRequest.downloadHandler = _downloadhandler; @@ -169,7 +173,7 @@ namespace YooAsset _steps = ESteps.Done; _lastError = "user abort"; _lastCode = 0; - + DisposeRequest(); DisposeHandler(); }