update resource manager

新增初始化参数:WebGLForceSyncLoadAsset
This commit is contained in:
何冠峰
2025-06-18 11:12:42 +08:00
parent 9ed85afb29
commit 6c98f9a09d
8 changed files with 40 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ namespace YooAsset
Done,
}
private readonly ResourceManager _resourceManager;
private readonly ResourceManager _resManager;
private readonly List<ProviderOperation> _providers = new List<ProviderOperation>(100);
private readonly List<ProviderOperation> _removeList = new List<ProviderOperation>(100);
private FSLoadBundleOperation _loadBundleOp;
@@ -53,7 +53,7 @@ namespace YooAsset
internal LoadBundleFileOperation(ResourceManager resourceManager, BundleInfo bundleInfo)
{
_resourceManager = resourceManager;
_resManager = resourceManager;
LoadBundleInfo = bundleInfo;
}
internal override void InternalStart()
@@ -73,7 +73,7 @@ namespace YooAsset
}
else
{
if (_resourceManager.BundleLoadingIsBusy())
if (_resManager.BundleLoadingIsBusy())
return;
_steps = ESteps.LoadBundleFile;
}
@@ -83,7 +83,7 @@ namespace YooAsset
{
if (_loadBundleOp == null)
{
_resourceManager.BundleLoadingCounter++;
_resManager.BundleLoadingCounter++;
_loadBundleOp = LoadBundleInfo.LoadBundleFile();
_loadBundleOp.StartOperation();
AddChildOperation(_loadBundleOp);
@@ -121,7 +121,7 @@ namespace YooAsset
}
// 统计计数减少
_resourceManager.BundleLoadingCounter--;
_resManager.BundleLoadingCounter--;
}
}
internal override void InternalWaitForAsyncComplete()
@@ -191,7 +191,7 @@ namespace YooAsset
{
foreach (var bundleID in LoadBundleInfo.Bundle.ReferenceBundleIDs)
{
if (_resourceManager.CheckBundleDestroyed(bundleID) == false)
if (_resManager.CheckBundleDestroyed(bundleID) == false)
return false;
}
}
@@ -233,7 +233,7 @@ namespace YooAsset
// 移除资源提供者
if (_removeList.Count > 0)
{
_resourceManager.RemoveBundleProviders(_removeList);
_resManager.RemoveBundleProviders(_removeList);
_removeList.Clear();
}
}