AActor::Tags
#include "GameFramework/Actor.h"
Access: public
Specifiers: UPROPERTYEditAnywhereBlueprintReadWriteAdvancedDisplay
Description
An array of FName tags attached to this actor for grouping and querying purposes. Use ActorHasTag() to test membership without iterating manually.
Caveats & Gotchas
- • Tag comparison is case-sensitive by default — 'Enemy' and 'enemy' are treated as different tags. Standardise capitalisation in your project.
- • Tags are replicated only if you explicitly mark the actor or use a ReplicatedUsing callback; the array itself has no built-in replication.
Signature
TArray<FName> Tags Examples
Check if an actor has a specific tag on BeginPlay
Blueprint
Add a tag and check for it C++
// In BeginPlay or wherever appropriate
Tags.AddUnique(FName("Destructible"));
// Later, from any code with an AActor* reference
if (MyActor->ActorHasTag("Destructible"))
{
// handle destructible logic
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?