Skip to content

Tagging

ClassAssetInventoryAssetInventory.Editor
public static class Tagging

No description is available for this type.

public static event Action OnTagsChanged

No description is available for this member.

Returns

System.Action — No return description is available.

public static bool AddAssignment(int targetId, string tag, TagAssignment.Target target, bool fromAssetStore = false)

No description is available for this member.

Parameters

Name Type Description
targetId System.Int32
tag System.String
target AssetInventory.TagAssignment.Target
fromAssetStore System.Boolean

Returns

System.Boolean — No return description is available.

AddAssignment(AssetInfo, string, Target, bool)

Section titled “AddAssignment(AssetInfo, string, Target, bool)”
public static bool AddAssignment(AssetInfo info, string tag, TagAssignment.Target target, bool byUser = false)

No description is available for this member.

Parameters

Name Type Description
info AssetInventory.AssetInfo
tag System.String
target AssetInventory.TagAssignment.Target
byUser System.Boolean

Returns

System.Boolean — No return description is available.

AddAssignments(List, string, Target, bool)

Section titled “AddAssignments(List, string, Target, bool)”
public static void AddAssignments(List<AssetInfo> infos, string tag, TagAssignment.Target target, bool byUser = false)

No description is available for this member.

Parameters

Name Type Description
infos System.Collections.Generic.List{AssetInventory.AssetInfo}
tag System.String
target AssetInventory.TagAssignment.Target
byUser System.Boolean

RemoveAssignment(AssetInfo, TagInfo, bool, bool)

Section titled “RemoveAssignment(AssetInfo, TagInfo, bool, bool)”
public static void RemoveAssignment(AssetInfo info, TagInfo tagInfo, bool autoReload = true, bool byUser = false)

No description is available for this member.

Parameters

Name Type Description
info AssetInventory.AssetInfo
tagInfo AssetInventory.TagInfo
autoReload System.Boolean
byUser System.Boolean

RemoveAssetAssignments(List, string, bool)

Section titled “RemoveAssetAssignments(List, string, bool)”
public static void RemoveAssetAssignments(List<AssetInfo> infos, string name, bool byUser)

No description is available for this member.

Parameters

Name Type Description
infos System.Collections.Generic.List{AssetInventory.AssetInfo}
name System.String
byUser System.Boolean

RemovePackageAssignments(List, string, bool)

Section titled “RemovePackageAssignments(List, string, bool)”
public static void RemovePackageAssignments(List<AssetInfo> infos, string name, bool byUser)

No description is available for this member.

Parameters

Name Type Description
infos System.Collections.Generic.List{AssetInventory.AssetInfo}
name System.String
byUser System.Boolean
public static List<TagInfo> GetAssetTags(int assetFileId)

No description is available for this member.

Parameters

Name Type Description
assetFileId System.Int32

Returns

System.Collections.Generic.List{AssetInventory.TagInfo} — No return description is available.

public static List<TagInfo> GetPackageTags(int assetId)

No description is available for this member.

Parameters

Name Type Description
assetId System.Int32

Returns

System.Collections.Generic.List{AssetInventory.TagInfo} — No return description is available.

public static void SaveTag(Tag tag)

No description is available for this member.

Parameters

Name Type Description
tag AssetInventory.Tag
public static Tag AddTag(string name, bool fromAssetStore = false)

No description is available for this member.

Parameters

Name Type Description
name System.String
fromAssetStore System.Boolean

Returns

AssetInventory.Tag — No return description is available.

public static void RenameTag(Tag tag, string newName)

No description is available for this member.

Parameters

Name Type Description
tag AssetInventory.Tag
newName System.String
public static void DeleteTag(Tag tag)

No description is available for this member.

Parameters

Name Type Description
tag AssetInventory.Tag
public static void DeleteTagWithDescendants(Tag tag)

No description is available for this member.

Parameters

Name Type Description
tag AssetInventory.Tag
public static List<Tag> GetDescendantTags(int tagId)

No description is available for this member.

Parameters

Name Type Description
tagId System.Int32

Returns

System.Collections.Generic.List{AssetInventory.Tag} — No return description is available.

public static List<Tag> LoadTags()

No description is available for this member.

Returns

System.Collections.Generic.List{AssetInventory.Tag} — No return description is available.

public static HashSet<int> GetDescendantTagIds(int tagId)

No description is available for this member.

Parameters

Name Type Description
tagId System.Int32

Returns

System.Collections.Generic.HashSet{System.Int32} — No return description is available.

public static List<TagTreeElement> BuildTagTree()

No description is available for this member.

Returns

System.Collections.Generic.List{AssetInventory.TagTreeElement} — No return description is available.

public static Tag AddTagWithSlashHandling(string name, bool fromAssetStore = false)

Adds a tag with slash handling based on the global setting. When CreateHierarchy: splits on “/” and creates parent chain with proper ParentId relationships. When TakeAsIs: creates tag with “/” in the name literally.

Parameters

Name Type Description
name System.String
fromAssetStore System.Boolean

Returns

AssetInventory.Tag — No return description is available.

public static List<Tag> GetTagsWithSlash()

Returns all tags that contain “/” in their name.

Returns

System.Collections.Generic.List{AssetInventory.Tag} — No return description is available.

public static List<(string segment, Tag existingTag, int? currentParentId, int? newParentId)> CheckConversionConflicts(Tag tag)

Checks if converting a slash tag to hierarchy would cause reparenting conflicts. Returns a list of tags that would be reparented (already exist with a different parent).

Parameters

Name Type Description
tag AssetInventory.Tag

Returns

System.Collections.Generic.List{System.ValueTuple{System.String,AssetInventory.Tag,System.Nullable{System.Int32},System.Nullable{System.Int32}}} — No return description is available.

public static bool ConvertSlashTagToHierarchy(Tag tag, bool forceReparent = false)

Converts a tag containing “/” into a proper hierarchy. Splits on “/”, creates/reuses tags with proper ParentId chain, reassigns all TagAssignment records to the leaf tag, and deletes the original “/” tag.

Parameters

Name Type Description
tag AssetInventory.Tag The tag containing “/” to convert
forceReparent System.Boolean If true, will reparent existing tags even if they have a different parent

Returns

System.Boolean — True if conversion succeeded, false otherwise

public static (int convertedCount, List<(Tag tag, List<(string segment, Tag existingTag, int? currentParentId, int? newParentId)> conflicts)> skipped) ConvertAllSlashTagsToHierarchy()

Converts all tags containing “/” to hierarchy structure. Auto-converts those without conflicts and returns list of skipped tags.

Returns

System.ValueTuple{System.Int32,System.Collections.Generic.List{System.ValueTuple{AssetInventory.Tag,System.Collections.Generic.List{System.ValueTuple{System.String,AssetInventory.Tag,System.Nullable{System.Int32},System.Nullable{System.Int32}}}}}} — Tuple of (converted count, list of skipped tags with their conflict reasons)