diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs
index d23c992..853a450 100644
--- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs
+++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSetting.cs
@@ -40,6 +40,34 @@ namespace YooAsset.Editor
}
}
+ ///
+ /// 获取所有的资源标签
+ ///
+ public List GetAllTags()
+ {
+ HashSet result = new HashSet();
+ foreach (var group in Groups)
+ {
+ List 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 collectorTags = StringUtility.StringToStringList(collector.AssetTags, ';');
+ foreach (var tag in collectorTags)
+ {
+ if (result.Contains(tag) == false)
+ result.Add(tag);
+ }
+ }
+ }
+ return result.ToList();
+ }
+
///
/// 获取打包收集的资源文件
///
diff --git a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs
index 29e851d..6bc94aa 100644
--- a/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs
+++ b/Assets/YooAsset/Editor/AssetBundleCollector/AssetBundleCollectorSettingData.cs
@@ -394,5 +394,14 @@ namespace YooAsset.Editor
IsDirty = true;
}
}
+
+ ///
+ /// 获取所有的资源标签
+ ///
+ public static string GetAllTags()
+ {
+ var allTgas = Setting.GetAllTags();
+ return string.Join(";", allTgas);
+ }
}
}
\ No newline at end of file