mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-27 11:10:11 +00:00
Update AssetSystem
This commit is contained in:
@@ -90,6 +90,15 @@ namespace YooAsset
|
|||||||
/// 资源回收(卸载引用计数为零的资源)
|
/// 资源回收(卸载引用计数为零的资源)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void UnloadUnusedAssets()
|
public void UnloadUnusedAssets()
|
||||||
|
{
|
||||||
|
// 注意:资源包之间可能存在多层深层嵌套,需要多次循环释放。
|
||||||
|
int loopCount = 10;
|
||||||
|
for (int i = 0; i < loopCount; i++)
|
||||||
|
{
|
||||||
|
UnloadUnusedAssetsInternal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private void UnloadUnusedAssetsInternal()
|
||||||
{
|
{
|
||||||
if (_simulationOnEditor)
|
if (_simulationOnEditor)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user