mirror of https://github.com/tuyoogame/YooAsset
parent
43248408fc
commit
c0099cb90c
|
@ -203,6 +203,9 @@ namespace YooAsset
|
|||
}
|
||||
else if (_bundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromStreaming)
|
||||
{
|
||||
if (DownloadSystem.ContainsVerifyFile(_bundleInfo.Hash))
|
||||
_steps = ESteps.CheckAndCopyFile;
|
||||
else
|
||||
_steps = ESteps.DownloadFromApk;
|
||||
}
|
||||
else
|
||||
|
@ -235,8 +238,18 @@ namespace YooAsset
|
|||
}
|
||||
else
|
||||
{
|
||||
if (DownloadSystem.CheckContentIntegrity(GetCachePath(), _bundleInfo.SizeBytes, _bundleInfo.CRC))
|
||||
{
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.Hash, _bundleInfo.BundleName);
|
||||
_steps = ESteps.CheckAndCopyFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "File content verify failed !";
|
||||
}
|
||||
}
|
||||
_fileRequester.Dispose();
|
||||
}
|
||||
|
||||
|
@ -342,6 +355,9 @@ namespace YooAsset
|
|||
}
|
||||
else if (_bundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromStreaming)
|
||||
{
|
||||
if (DownloadSystem.ContainsVerifyFile(_bundleInfo.Hash))
|
||||
_steps = ESteps.CheckAndCopyFile;
|
||||
else
|
||||
_steps = ESteps.DownloadFromApk;
|
||||
}
|
||||
else if (_bundleInfo.LoadMode == BundleInfo.ELoadMode.LoadFromCache)
|
||||
|
@ -405,8 +421,18 @@ namespace YooAsset
|
|||
}
|
||||
else
|
||||
{
|
||||
if (DownloadSystem.CheckContentIntegrity(GetCachePath(), _bundleInfo.SizeBytes, _bundleInfo.CRC))
|
||||
{
|
||||
DownloadSystem.CacheVerifyFile(_bundleInfo.Hash, _bundleInfo.BundleName);
|
||||
_steps = ESteps.CheckAndCopyFile;
|
||||
}
|
||||
else
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Failed;
|
||||
Error = "File content verify failed !";
|
||||
}
|
||||
}
|
||||
_fileRequester.Dispose();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue