{ }Blueprint → C++

Unreal Engine 5 · Blueprint → C++

Get All Actors With Tag in Unreal Engine 5 C++

Get All Actors With Tag maps to UGameplayStatics::GetAllActorsWithTag, which fills a TArray<AActor*> with every actor that has the given tag in its Tags array.

Blueprint node & C++ equivalent

Get All Actors with Tag Blueprint node and its C++ equivalent in Unreal Engine 5
The “Get All Actors with Tag” Blueprint node.
C++
#include "Kismet/GameplayStatics.h"

// Result will be stored in this array
TArray<AActor*> Actors;

UGameplayStatics::GetAllActorsWithTag(
	this,                           // World context object
	"ExampleTag",                   // Tag name
	Actors                          // (Output) Result
);

The C++ equivalent

Include Kismet/GameplayStatics.h and call UGameplayStatics::GetAllActorsWithTag(this, "ExampleTag", Actors). The tag is an FName matched against each actor's Tags array, and the results are written into the out TArray<AActor*>.

How to use it in C++

Declare TArray<AActor*> Actors first, then pass it as the output. Tags are set on the actor's Tags property in the editor or in code, and because they are compared as FName the match is case-insensitive. This is useful for grouping actors by gameplay role without sharing a common class.

Frequently asked questions

How do I find actors by tag in UE5 C++?+

Call UGameplayStatics::GetAllActorsWithTag(this, "YourTag", Actors). It fills the TArray<AActor*> with actors whose Tags array contains that tag.

Are actor tags case sensitive in UE5?+

No. Tags are compared as FName, and FName equality is case-insensitive, so the tag you pass matches regardless of letter casing.

Related Utilities nodes

View all Utilities nodes →