diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs index b3fe009..02aa373 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/AssetBundleFileLoader.cs @@ -286,10 +286,12 @@ namespace YooAsset // 文件解压 if (_unpacker != null) { - _unpacker.WaitForAsyncComplete = true; - _unpacker.Update(); if (_unpacker.IsDone() == false) + { + _unpacker.WaitForAsyncComplete = true; + _unpacker.Update(); continue; + } } // 保险机制 diff --git a/Assets/YooAsset/Runtime/AssetSystem/Loader/RawBundleFileLoader.cs b/Assets/YooAsset/Runtime/AssetSystem/Loader/RawBundleFileLoader.cs index d2394a2..923e72c 100644 --- a/Assets/YooAsset/Runtime/AssetSystem/Loader/RawBundleFileLoader.cs +++ b/Assets/YooAsset/Runtime/AssetSystem/Loader/RawBundleFileLoader.cs @@ -124,13 +124,14 @@ namespace YooAsset DownloadProgress = 1f; DownloadedBytes = (ulong)MainBundleInfo.Bundle.FileSize; - _steps = ESteps.Done; if (File.Exists(FileLoadPath)) { + _steps = ESteps.Done; Status = EStatus.Succeed; } else { + _steps = ESteps.Done; Status = EStatus.Failed; LastError = $"Raw file not found : {FileLoadPath}"; } @@ -148,10 +149,12 @@ namespace YooAsset // 文件解压 if (_unpacker != null) { - _unpacker.WaitForAsyncComplete = true; - _unpacker.Update(); if (_unpacker.IsDone() == false) + { + _unpacker.WaitForAsyncComplete = true; + _unpacker.Update(); continue; + } } // 保险机制