Version:

Tag Component

Use the Tag component to apply one or more labels, or tags, to an entity. Use these tags to find or filter entities with particular labels.

Provider

O3DE Core (LmbrCentral) Gem

Tag properties

Tag component properties

PropertyDescriptionValuesDefault
TagsAn array of tags that are added to the entity.Array: TagNone

TagHelper

Request NameDescriptionParameterReturnScriptable
GetEntitiesbyTagReturns the array of entities with a specific tag.Tag: Crc32Array: EntityIdsYes

TagComponentRequestBus

Request NameDescriptionParameterReturnScriptable
AddTagAdds a tag to the entity.Tag: Crc32NoneYes
HasTagReturns True if the entity has a specific tag.Tag: Crc32BooleanYes
RemoveTagRemoves a specific tag from the entity.Tag: Crc32NoneYes

TagComponentNotificationsBus

Request NameDescriptionParameterReturnScriptable
OnTagAddedNotifies listeners when any tag is added to a specific entity.Entity: EntityIdTag: Crc32Yes
OnTagRemovedNotifies listeners when any tag is removed from a specific entity.Entity: EntityIdTag: Crc32Yes

TagGlobalRequestBus

Request NameDescriptionParameterReturnScriptable
RequestTaggedEntitiesReturns the first entity to respond with a specific tag.Tag: Crc32Tagged Entity: EntityIdYes

TagGlobalNotificationBus

Request NameDescriptionParameterReturnScriptable
OnEntityTagAddedNotifies listeners when a specific tag is added to any entity.Tag: Crc32Tagged Entity: EntityIdYes
OnEntityTagRemovedNotifies listeners when a specific tag is removed from any entity.Tag: Crc32Untagged Entity: EntityIdYes

For more information, see Working with the Event Bus (EBus) system.