RealDocs

AActor::ActorHasTag

function Engine Blueprint Since 4.0
#include "GameFramework/Actor.h"
Access: public Specifiers: UFUNCTIONBlueprintCallableENGINE_API

Description

Returns true if this actor's `Tags` array contains the specified name. A lightweight way to categorise actors without subclassing.

Caveats & Gotchas

  • Actor tags are stored in a `TArray<FName>` and searched linearly. For actors with many tags or high-frequency calls (e.g., in Tick), consider caching the result or using a boolean property instead.
  • Actor tags and **component** tags are separate arrays. `ActorHasTag` only checks the actor's own `Tags` array — not the tags on any of its components.

Signature

ENGINE_API bool ActorHasTag(FName Tag) const;

Parameters

Name Type Description Default
Tag FName The tag name to search for in this actor's Tags array.

Return Type

bool

Examples

React when the overlapping actor has the Player tag Blueprint
Event Actor Begin Overlap Other Overlap Info Other Overlap Info Other Actor Branch Condition Condition True False Print String In String Player entered! Player entered! Actor Has Tag Target is Actor Target Tag Player Return Value
Edit Blueprint graph React when the overlapping actor has the Player tag
Drag node headers to move · Drag from an output pin to an input pin to connect · Scroll to zoom · Right-click for actions
Filter overlapping actors by tag C++
void AMyTrigger::OnOverlapBegin(AActor* OtherActor)
{
	if (OtherActor && OtherActor->ActorHasTag(FName("Player")))
	{
		ActivateTrigger();
	}
}

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.