mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-06-12 06:03:44 +00:00
@@ -95,7 +95,8 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (IsWaitForAsyncComplete == false && _failedTryAgain > 0)
|
// 注意:本地文件(解压/导入)校验失败属于确定性失败,重试只会重复读取同一文件,直接判定失败防止无限重试。
|
||||||
|
if (IsWaitForAsyncComplete == false && _failedTryAgain > 0 && _unityDownloadFileOp.VerifyFailed == false)
|
||||||
{
|
{
|
||||||
_steps = ESteps.TryAgain;
|
_steps = ESteps.TryAgain;
|
||||||
YooLogger.Warning($"Failed download : {_unityDownloadFileOp.URL} Try again !");
|
YooLogger.Warning($"Failed download : {_unityDownloadFileOp.URL} Try again !");
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ namespace YooAsset
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int RefCount { private set; get; }
|
public int RefCount { private set; get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 文件校验是否失败
|
||||||
|
/// 注意:本地文件(解压/导入)校验失败属于确定性失败,重试无意义,上层不应重试。
|
||||||
|
/// </summary>
|
||||||
|
public bool VerifyFailed { protected set; get; } = false;
|
||||||
|
|
||||||
internal UnityDownloadFileOperation(DefaultCacheFileSystem fileSystem, PackageBundle bundle, string url) : base(url)
|
internal UnityDownloadFileOperation(DefaultCacheFileSystem fileSystem, PackageBundle bundle, string url) : base(url)
|
||||||
{
|
{
|
||||||
_fileSystem = fileSystem;
|
_fileSystem = fileSystem;
|
||||||
|
|||||||
@@ -133,6 +133,8 @@ namespace YooAsset
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// 注意:本地内置文件被篡改或损坏时校验会失败,重试只会重复读取同一文件,因此标记为不可重试。
|
||||||
|
VerifyFailed = true;
|
||||||
_steps = ESteps.Done;
|
_steps = ESteps.Done;
|
||||||
Status = EOperationStatus.Failed;
|
Status = EOperationStatus.Failed;
|
||||||
Error = _verifyOperation.Error;
|
Error = _verifyOperation.Error;
|
||||||
|
|||||||
Reference in New Issue
Block a user