mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-20 15:20:07 +00:00
support legacy dependency mode
YOOASSET_LEGACY_DEPENDENCY
This commit is contained in:
@@ -153,7 +153,23 @@ namespace YooAsset
|
||||
if (IsDone == false)
|
||||
return false;
|
||||
|
||||
return RefCount <= 0;
|
||||
if (RefCount > 0)
|
||||
return false;
|
||||
|
||||
#region YOOASSET_LEGACY_DEPENDENCY
|
||||
// 检查引用链上的资源包是否已经全部销毁
|
||||
// 注意:互相引用的资源包无法卸载!
|
||||
if (LoadBundleInfo.Bundle.ReferenceBundleIDs.Length > 0)
|
||||
{
|
||||
foreach (var bundleID in LoadBundleInfo.Bundle.ReferenceBundleIDs)
|
||||
{
|
||||
if (_resourceManager.CheckBundleDestroyed(bundleID) == false)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user