Update runtime
This commit is contained in:
@@ -81,7 +81,7 @@ namespace YooAsset
|
||||
if (hasError == false)
|
||||
{
|
||||
// 注意:如果文件验证失败需要删除文件
|
||||
if (DownloadSystem.CheckContentIntegrity(_bundleInfo.GetCacheLoadPath(), _bundleInfo.SizeBytes, _bundleInfo.CRC) == false)
|
||||
if (DownloadSystem.CheckContentIntegrity(_bundleInfo.GetCacheLoadPath(), _bundleInfo.FileSize, _bundleInfo.FileCRC) == false)
|
||||
{
|
||||
hasError = true;
|
||||
_lastError = $"Verification failed";
|
||||
@@ -91,7 +91,7 @@ namespace YooAsset
|
||||
if (hasError == false)
|
||||
{
|
||||
_steps = ESteps.Succeed;
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.Hash, _bundleInfo.FileName);
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.FileHash, _bundleInfo.FileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace YooAsset
|
||||
|
||||
_requestURL = GetRequestURL();
|
||||
_threadDownloader = new ThreadDownloader();
|
||||
_threadDownloader.Run(_requestURL, _bundleInfo.GetCacheLoadPath(), _bundleInfo.FileName, _bundleInfo.CRC, _bundleInfo.SizeBytes, _timeout);
|
||||
_threadDownloader.Run(_requestURL, _bundleInfo.GetCacheLoadPath(), _bundleInfo.FileName, _bundleInfo.FileCRC, _bundleInfo.FileSize, _timeout);
|
||||
_steps = ESteps.CheckDownload;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace YooAsset
|
||||
}
|
||||
else
|
||||
{
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.Hash, _bundleInfo.FileName);
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.FileHash, _bundleInfo.FileName);
|
||||
_steps = ESteps.Succeed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace YooAsset
|
||||
public TempDownloader(BundleInfo bundleInfo) : base(bundleInfo)
|
||||
{
|
||||
_downloadProgress = 1f;
|
||||
_downloadedBytes = (ulong)bundleInfo.SizeBytes;
|
||||
_downloadedBytes = (ulong)bundleInfo.FileSize;
|
||||
_steps = ESteps.Succeed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user