Update AssetBundleBuilder

pull/33/head
hevinci 2022-08-02 14:30:25 +08:00
parent cecbb35f1a
commit 8b8f44d2a8
2 changed files with 37 additions and 0 deletions

View File

@ -40,6 +40,34 @@ namespace YooAsset.Editor
} }
} }
/// <summary>
/// 获取所有的资源标签
/// </summary>
public List<string> GetAllTags()
{
HashSet<string> result = new HashSet<string>();
foreach (var group in Groups)
{
List<string> groupTags = StringUtility.StringToStringList(group.AssetTags, ';');
foreach (var tag in groupTags)
{
if (result.Contains(tag) == false)
result.Add(tag);
}
foreach (var collector in group.Collectors)
{
List<string> collectorTags = StringUtility.StringToStringList(collector.AssetTags, ';');
foreach (var tag in collectorTags)
{
if (result.Contains(tag) == false)
result.Add(tag);
}
}
}
return result.ToList();
}
/// <summary> /// <summary>
/// 获取打包收集的资源文件 /// 获取打包收集的资源文件
/// </summary> /// </summary>

View File

@ -394,5 +394,14 @@ namespace YooAsset.Editor
IsDirty = true; IsDirty = true;
} }
} }
/// <summary>
/// 获取所有的资源标签
/// </summary>
public static string GetAllTags()
{
var allTgas = Setting.GetAllTags();
return string.Join(";", allTgas);
}
} }
} }