mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-24 09:40:11 +00:00
update resource manager
优化ForceUnloadAllAssets方法逻辑
This commit is contained in:
@@ -300,7 +300,13 @@ namespace YooAsset
|
||||
public UpdatePackageManifestOperation UpdatePackageManifestAsync(string packageVersion, bool autoSaveVersion = true, int timeout = 60)
|
||||
{
|
||||
DebugCheckInitialize(false);
|
||||
DebugCheckUpdateManifest();
|
||||
|
||||
// 注意:强烈建议在更新之前保持加载器为空!
|
||||
if (_resourceMgr.HasAnyLoader())
|
||||
{
|
||||
YooLogger.Warning($"Found loaded bundle before update manifest ! Recommended to call the {nameof(ForceUnloadAllAssets)} method to release loaded bundle !");
|
||||
}
|
||||
|
||||
return _playModeImpl.UpdatePackageManifestAsync(packageVersion, autoSaveVersion, timeout);
|
||||
}
|
||||
|
||||
@@ -1128,16 +1134,6 @@ namespace YooAsset
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
private void DebugCheckUpdateManifest()
|
||||
{
|
||||
var loadedBundleInfos = _resourceMgr.GetLoadedBundleInfos();
|
||||
if (loadedBundleInfos.Count > 0)
|
||||
{
|
||||
YooLogger.Warning($"Found loaded bundle before update manifest ! Recommended to call the {nameof(ForceUnloadAllAssets)} method to release loaded bundle !");
|
||||
}
|
||||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
private void DebugCheckRawFileLoadMethod(string method)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user