Update patch manifest

更新资源清单:资源对象增加分类标签。
This commit is contained in:
hevinci
2022-05-11 16:23:31 +08:00
parent ae465a47a9
commit 67eeae31c7
9 changed files with 77 additions and 17 deletions
@@ -1,4 +1,5 @@
using System;
using System.Linq;
namespace YooAsset
{
@@ -15,6 +16,11 @@ namespace YooAsset
/// </summary>
public string AssetPath;
/// <summary>
/// 资源的分类标签
/// </summary>
public string[] AssetTags;
/// <summary>
/// 所属资源包ID
/// </summary>
@@ -24,5 +30,24 @@ namespace YooAsset
/// 依赖的资源包ID列表
/// </summary>
public int[] DependIDs;
/// <summary>
/// 是否包含Tag
/// </summary>
public bool HasTag(string[] tags)
{
if (tags == null || tags.Length == 0)
return false;
if (AssetTags == null || AssetTags.Length == 0)
return false;
foreach (var tag in tags)
{
if (AssetTags.Contains(tag))
return true;
}
return false;
}
}
}