Update runtime code

修复资源回收无效的问题。
pull/51/head
hevinci 2022-10-22 15:37:53 +08:00
parent cb4ebb6306
commit 989d88f7d3
1 changed files with 11 additions and 11 deletions

View File

@ -122,6 +122,7 @@ namespace YooAsset
}
// 监听初始化结果
_isInitialize = true;
initializeOperation.Completed += InitializeOperation_Completed;
return initializeOperation;
}
@ -298,23 +299,19 @@ namespace YooAsset
/// </summary>
public void UnloadUnusedAssets()
{
if (_isInitialize)
{
DebugCheckInitialize();
_assetSystemImpl.Update();
_assetSystemImpl.UnloadUnusedAssets();
}
}
/// <summary>
/// 强制回收所有资源
/// </summary>
public void ForceUnloadAllAssets()
{
if (_isInitialize)
{
DebugCheckInitialize();
_assetSystemImpl.ForceUnloadAllAssets();
}
}
#region 资源信息
@ -982,9 +979,12 @@ namespace YooAsset
#endregion
#region 调试信息
internal List<DebugProviderInfo> GetDebugReportInfos()
internal DebugPackageData GetDebugPackageData()
{
return _assetSystemImpl.GetDebugReportInfos();
DebugPackageData data = new DebugPackageData();
data.PackageName = PackageName;
data.ProviderInfos = _assetSystemImpl.GetDebugReportInfos();
return data;
}
#endregion