Update CacheSystem
This commit is contained in:
@@ -81,7 +81,7 @@ namespace YooAsset
|
||||
if (hasError == false)
|
||||
{
|
||||
// 注意:如果文件验证失败需要删除文件
|
||||
if (DownloadSystem.CheckContentIntegrity(_bundleInfo.GetCacheLoadPath(), _bundleInfo.FileSize, _bundleInfo.FileCRC) == false)
|
||||
if (CacheSystem.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.FileHash, _bundleInfo.FileName);
|
||||
CacheSystem.CacheVerifyFile(_bundleInfo.FileHash, _bundleInfo.FileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -156,7 +156,7 @@ namespace YooAsset
|
||||
// 验证下载文件完整性
|
||||
if (DownloadedBytes == (ulong)_fileSize)
|
||||
{
|
||||
bool verfiyResult = DownloadSystem.CheckContentIntegrity(_savePath, _fileSize, _fileCRC);
|
||||
bool verfiyResult = CacheSystem.CheckContentIntegrity(_savePath, _fileSize, _fileCRC);
|
||||
if (verfiyResult == false)
|
||||
{
|
||||
Error = $"Verify download content failed : {_fileName}";
|
||||
@@ -226,7 +226,7 @@ namespace YooAsset
|
||||
}
|
||||
else
|
||||
{
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.FileHash, _bundleInfo.FileName);
|
||||
CacheSystem.CacheVerifyFile(_bundleInfo.FileHash, _bundleInfo.FileName);
|
||||
_steps = ESteps.Succeed;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user