update editor code

增加自动分析冗余资源的开关
This commit is contained in:
hevinci
2023-06-14 16:40:27 +08:00
parent cd43d0775d
commit f1a5965b4c
16 changed files with 521 additions and 9 deletions

View File

@@ -183,5 +183,27 @@ namespace YooAsset.Editor
}
}
}
/// <summary>
/// 判断是否为冗余资源
/// </summary>
public bool IsRedundancyAsset()
{
if (CollectorType != ECollectorType.None)
return false;
if (IsRawAsset)
throw new Exception("Should never get here !");
return _referenceBundleNames.Count > 1;
}
/// <summary>
/// 获取关联资源包的数量
/// </summary>
public int GetReferenceBundleCount()
{
return _referenceBundleNames.Count;
}
}
}