修复了同步加载原生文件,程序卡死的问题。
This commit is contained in:
hevinci
2023-03-06 20:05:34 +08:00
parent b330d26b4f
commit ef5e1e65f9
7 changed files with 37 additions and 28 deletions
@@ -34,6 +34,11 @@ namespace YooAsset
protected float _downloadProgress = 0f;
protected ulong _downloadedBytes = 0;
/// <summary>
/// 是否等待异步结束
/// 警告:只能用于解压APP内部资源
/// </summary>
public bool WaitForAsyncComplete = false;
/// <summary>
/// 下载进度(0f~1f)
@@ -48,6 +48,9 @@ namespace YooAsset
// 等待检测结果
if (_steps == ESteps.WaitingCheckTempFile)
{
if (WaitForAsyncComplete)
_checkFileOp.Update();
if (_checkFileOp.IsDone == false)
return;
@@ -220,6 +223,9 @@ namespace YooAsset
// 等待验证完成
if (_steps == ESteps.WaitingVerifyTempFile)
{
if (WaitForAsyncComplete)
_verifyFileOp.Update();
if (_verifyFileOp.IsDone == false)
return;