mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-27 11:10:11 +00:00
update download system
This commit is contained in:
@@ -72,14 +72,18 @@ namespace YooAsset
|
|||||||
{
|
{
|
||||||
uint crc = _bundleInfo.Bundle.UnityCRC;
|
uint crc = _bundleInfo.Bundle.UnityCRC;
|
||||||
_downloadhandler = new DownloadHandlerAssetBundle(_requestURL, crc);
|
_downloadhandler = new DownloadHandlerAssetBundle(_requestURL, crc);
|
||||||
|
#if UNITY_2020_3_OR_NEWER
|
||||||
_downloadhandler.autoLoadAssetBundle = false;
|
_downloadhandler.autoLoadAssetBundle = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
uint crc = _bundleInfo.Bundle.UnityCRC;
|
uint crc = _bundleInfo.Bundle.UnityCRC;
|
||||||
var hash = Hash128.Parse(_bundleInfo.Bundle.FileHash);
|
var hash = Hash128.Parse(_bundleInfo.Bundle.FileHash);
|
||||||
_downloadhandler = new DownloadHandlerAssetBundle(_requestURL, hash, crc);
|
_downloadhandler = new DownloadHandlerAssetBundle(_requestURL, hash, crc);
|
||||||
|
#if UNITY_2020_3_OR_NEWER
|
||||||
_downloadhandler.autoLoadAssetBundle = false;
|
_downloadhandler.autoLoadAssetBundle = false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
_webRequest.downloadHandler = _downloadhandler;
|
_webRequest.downloadHandler = _downloadhandler;
|
||||||
|
|||||||
Reference in New Issue
Block a user