This commit is contained in:
何冠峰
2025-10-30 18:31:06 +08:00
parent 2a956099ae
commit d570ba8d74
7 changed files with 136 additions and 8 deletions
@@ -173,6 +173,13 @@ namespace YooAsset
if (Result != null)
Result.UnloadBundleFile();
if (IsDone == false)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "Bundle loader destroyed !";
}
}
/// <summary>
@@ -256,5 +263,28 @@ namespace YooAsset
_removeList.Clear();
}
}
/// <summary>
/// 尝试终止加载器
/// </summary>
public void TryAbortLoader()
{
if (IsDone == false)
{
if (_steps == ESteps.CheckConcurrency)
{
_steps = ESteps.Done;
Status = EOperationStatus.Failed;
Error = "Abort bundle loader !";
}
if (_steps == ESteps.LoadBundleFile)
{
// 注意:终止下载器
if (_loadBundleOp != null)
_loadBundleOp.AbortDownloadFile = true;
}
}
}
}
}