From dc46462bfa9cc493a34e828748d92099023f431f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=95=E5=86=A0=E5=B3=B0?= Date: Wed, 23 Apr 2025 14:14:34 +0800 Subject: [PATCH] fix : remove Caching class it's not support in webGL --- .../DownloadWebNormalAssetBundleOperation.cs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/DownloadWebNormalAssetBundleOperation.cs b/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/DownloadWebNormalAssetBundleOperation.cs index 93da0279..58425012 100644 --- a/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/DownloadWebNormalAssetBundleOperation.cs +++ b/Assets/YooAsset/Runtime/FileSystem/Operation/Internal/DownloadWebNormalAssetBundleOperation.cs @@ -133,23 +133,11 @@ namespace YooAsset // 注意:优先从浏览器缓存里获取文件 // The file hash defining the version of the asset bundle. Hash128 fileHash = Hash128.Parse(Bundle.FileHash); - var cachedBundle = new CachedAssetBundle(Bundle.BundleName, fileHash); - if (Caching.IsVersionCached(cachedBundle)) - { - var downloadhandler = new DownloadHandlerAssetBundle(_requestURL, cachedBundle, 0); + var downloadhandler = new DownloadHandlerAssetBundle(_requestURL, fileHash, Bundle.UnityCRC); #if UNITY_2020_3_OR_NEWER - downloadhandler.autoLoadAssetBundle = false; + downloadhandler.autoLoadAssetBundle = false; #endif - return downloadhandler; - } - else - { - var downloadhandler = new DownloadHandlerAssetBundle(_requestURL, cachedBundle, Bundle.UnityCRC); -#if UNITY_2020_3_OR_NEWER - downloadhandler.autoLoadAssetBundle = false; -#endif - return downloadhandler; - } + return downloadhandler; } } }