mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
更新YooAsset 2.3.3 -> 2.3.7 优化YooAsset.RuntimeExtension以及YooAsset.EditorExtension目录结构
This commit is contained in:
@@ -15,6 +15,7 @@ namespace YooAsset
|
||||
|
||||
private readonly ResourceManager _resManager;
|
||||
private readonly int _loopCount;
|
||||
private int _loopCounter = 0;
|
||||
private ESteps _steps = ESteps.None;
|
||||
|
||||
internal UnloadUnusedAssetsOperation(ResourceManager resourceManager, int loopCount)
|
||||
@@ -25,6 +26,7 @@ namespace YooAsset
|
||||
internal override void InternalStart()
|
||||
{
|
||||
_steps = ESteps.UnloadUnused;
|
||||
_loopCounter = _loopCount;
|
||||
}
|
||||
internal override void InternalUpdate()
|
||||
{
|
||||
@@ -33,13 +35,23 @@ namespace YooAsset
|
||||
|
||||
if (_steps == ESteps.UnloadUnused)
|
||||
{
|
||||
for (int i = 0; i < _loopCount; i++)
|
||||
while (_loopCounter > 0)
|
||||
{
|
||||
_loopCounter--;
|
||||
LoopUnloadUnused();
|
||||
|
||||
if (IsWaitForAsyncComplete == false)
|
||||
{
|
||||
if (OperationSystem.IsBusy)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Succeed;
|
||||
if (_loopCounter <= 0)
|
||||
{
|
||||
_steps = ESteps.Done;
|
||||
Status = EOperationStatus.Succeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
internal override void InternalWaitForAsyncComplete()
|
||||
|
Reference in New Issue
Block a user