mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-30 05:28:46 +00:00
fix : remove Caching class
it's not support in webGL
This commit is contained in:
@@ -133,23 +133,11 @@ namespace YooAsset
|
|||||||
// 注意:优先从浏览器缓存里获取文件
|
// 注意:优先从浏览器缓存里获取文件
|
||||||
// The file hash defining the version of the asset bundle.
|
// The file hash defining the version of the asset bundle.
|
||||||
Hash128 fileHash = Hash128.Parse(Bundle.FileHash);
|
Hash128 fileHash = Hash128.Parse(Bundle.FileHash);
|
||||||
var cachedBundle = new CachedAssetBundle(Bundle.BundleName, fileHash);
|
var downloadhandler = new DownloadHandlerAssetBundle(_requestURL, fileHash, Bundle.UnityCRC);
|
||||||
if (Caching.IsVersionCached(cachedBundle))
|
|
||||||
{
|
|
||||||
var downloadhandler = new DownloadHandlerAssetBundle(_requestURL, cachedBundle, 0);
|
|
||||||
#if UNITY_2020_3_OR_NEWER
|
#if UNITY_2020_3_OR_NEWER
|
||||||
downloadhandler.autoLoadAssetBundle = false;
|
downloadhandler.autoLoadAssetBundle = false;
|
||||||
#endif
|
#endif
|
||||||
return downloadhandler;
|
return downloadhandler;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var downloadhandler = new DownloadHandlerAssetBundle(_requestURL, cachedBundle, Bundle.UnityCRC);
|
|
||||||
#if UNITY_2020_3_OR_NEWER
|
|
||||||
downloadhandler.autoLoadAssetBundle = false;
|
|
||||||
#endif
|
|
||||||
return downloadhandler;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user