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

@ -285,12 +285,14 @@ namespace YooAsset
{
// 文件解压
if (_unpacker != null)
{
if (_unpacker.IsDone() == false)
{
_unpacker.WaitForAsyncComplete = true;
_unpacker.Update();
if (_unpacker.IsDone() == false)
continue;
}
}
// 保险机制
// 注意如果需要从WEB端下载资源可能会触发保险机制

View File

@ -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}";
}
@ -147,12 +148,14 @@ namespace YooAsset
{
// 文件解压
if (_unpacker != null)
{
if (_unpacker.IsDone() == false)
{
_unpacker.WaitForAsyncComplete = true;
_unpacker.Update();
if (_unpacker.IsDone() == false)
continue;
}
}
// 保险机制
// 注意:如果需要从远端下载资源,可能会触发保险机制!