update asset system

pull/82/head
hevinci 2023-03-10 15:53:28 +08:00
parent 9891ab23a2
commit c8cdeb2ae1
2 changed files with 10 additions and 5 deletions

View File

@ -286,10 +286,12 @@ namespace YooAsset
// 文件解压 // 文件解压
if (_unpacker != null) if (_unpacker != null)
{ {
_unpacker.WaitForAsyncComplete = true;
_unpacker.Update();
if (_unpacker.IsDone() == false) if (_unpacker.IsDone() == false)
{
_unpacker.WaitForAsyncComplete = true;
_unpacker.Update();
continue; continue;
}
} }
// 保险机制 // 保险机制

View File

@ -124,13 +124,14 @@ namespace YooAsset
DownloadProgress = 1f; DownloadProgress = 1f;
DownloadedBytes = (ulong)MainBundleInfo.Bundle.FileSize; DownloadedBytes = (ulong)MainBundleInfo.Bundle.FileSize;
_steps = ESteps.Done;
if (File.Exists(FileLoadPath)) if (File.Exists(FileLoadPath))
{ {
_steps = ESteps.Done;
Status = EStatus.Succeed; Status = EStatus.Succeed;
} }
else else
{ {
_steps = ESteps.Done;
Status = EStatus.Failed; Status = EStatus.Failed;
LastError = $"Raw file not found : {FileLoadPath}"; LastError = $"Raw file not found : {FileLoadPath}";
} }
@ -148,10 +149,12 @@ namespace YooAsset
// 文件解压 // 文件解压
if (_unpacker != null) if (_unpacker != null)
{ {
_unpacker.WaitForAsyncComplete = true;
_unpacker.Update();
if (_unpacker.IsDone() == false) if (_unpacker.IsDone() == false)
{
_unpacker.WaitForAsyncComplete = true;
_unpacker.Update();
continue; continue;
}
} }
// 保险机制 // 保险机制