refactor : 重构异步操作模块

This commit is contained in:
何冠峰
2026-01-12 11:09:27 +08:00
parent d228e41df7
commit a3f689d815
30 changed files with 315 additions and 433 deletions
@@ -22,5 +22,10 @@ namespace YooAsset
/// 原生文件
/// </summary>
RawBundle = 3,
/// <summary>
/// 团结资源包
/// </summary>
InstantBundle = 4,
}
}
@@ -220,14 +220,7 @@ namespace YooAsset
}
internal override void InternalWaitForAsyncComplete()
{
while (true)
{
if (ExecuteWhileDone())
{
_steps = ESteps.Done;
break;
}
}
RunBatchExecution();
}
private void CreateAssetCollection(PackageManifest manifest, int assetCount)
@@ -213,7 +213,7 @@ namespace YooAsset
options.ReleaseAllHandles = true;
options.LockLoadOperation = true;
var operation = new DestroyOperation(this, options);
OperationSystem.StartOperation(null, operation);
OperationSystem.StartOperation(OperationSystem.GLOBAL_SCHEDULER_NAME, operation);
return operation;
}