Actor Has Tag / Component Has Tag / Get Components by Tag¶
At a glance
Lives in: Blueprint API / Actor and Components -
Reads: the Actor's Tags array or an Actor Component's Component
Tags array -
Returns: Actor Has Tag and Component Has Tag return a Boolean;
Get Components by Tag returns an array of ActorComponent references -
Fails by: returning false or an empty array, silently -
Tag type: plain Name (FName), not a Gameplay Tag -
Official docs: Actor Has Tag,
Component Has Tag,
and Get Components by Tag
The one-minute version¶
Actor Has Tagchecks one Actor's Actor Tags array for a plainName.Component Has Tagchecks one component's Component Tags array. It does not look at the owning Actor's tags.Get Components by Tagsearches components owned by one Actor, keeps those whose class matches the requested class or a subclass, then keeps those with the requested Component Tag.- No match is ordinary: the Boolean is
falseor the array is empty. The nodes do not print a warning or try another tag system. - Plain tags are
FNamevalues.FNamecomparison is case-insensitive but case-preserving, soWeakPointandweakpointcompare as the same name; different spelling, spaces, punctuation, or words do not. - Actor Tags, Component Tags, and Gameplay Tags are separate storage systems. A tag in one is invisible to queries for another.
- A tag identifies or groups something. It does not add functions, enforce an interface, grant an ability, or replicate gameplay state.
What they actually do¶
Actors expose a Tags array. Every Actor Component exposes a separate
ComponentTags array. Both arrays store FName values.
The Boolean nodes are direct membership tests:
pseudocode of the engine behavior - not engine source
function ActorHasTag(Actor, TagName):
return Actor.Tags contains TagName
function ComponentHasTag(Component, TagName):
return Component.ComponentTags contains TagName
Get Components by Tag combines a local component-class search with the
component membership test:
function GetComponentsByTag(Actor, ComponentClass, TagName):
Results = []
for each component owned by Actor:
if component is ComponentClass or a subclass:
if component.ComponentTags contains TagName:
Results.add(component)
return Results
None of these nodes searches every actor in the level. The Boolean tests read
one array. Get Components by Tag searches only components owned by its Target
Actor.
Three tag systems that do not cross¶
The word "tag" appears in several Unreal systems. The storage location decides which node can see it.
| Where you set it | Stored as | Query it with | What it is good for |
|---|---|---|---|
| Actor Details / Actor -> Tags | TArray<FName> on the Actor |
Actor Has Tag, Get All Actors with Tag |
Simple labels on whole placed/spawned actors. |
| Component Details / Tags -> Component Tags | TArray<FName> on that Actor Component |
Component Has Tag, Get Components by Tag |
Labels on a specific mesh, collider, audio component, or other part. |
| A Gameplay Tag or Gameplay Tag Container variable | FGameplayTag / FGameplayTagContainer |
Has Tag, Has Any, Has All, Gameplay Tag Query |
Defined, hierarchical gameplay vocabulary and container matching. |
These values can contain similar-looking text and still be unrelated:
Actor Tags: Enemy
Mesh Component Tags: WeakPoint
Gameplay Tag Container: State.Combat.Stunned
Actor Has Tag("WeakPoint") is false in that setup because WeakPoint lives
on the component. Gameplay Tag State.Combat.Stunned is not found by either
plain-Name node.
FName matching: case-insensitive, not hierarchical¶
Plain Actor and Component tags use Unreal's Name type (FName). FNames are
case-insensitive for equality while preserving a spelling for display.
| Stored tag | Query | Match? | Why |
|---|---|---|---|
WeakPoint |
weakpoint |
Yes | Case differs, but FName equality is case-insensitive. |
WeakPoint |
Weak Point |
No | The space changes the name. |
WeakPoint |
WeakpointMesh |
No | Different name. |
Damage.Fire |
Damage |
No | Plain tags have no parent/child hierarchy. |
Use consistent casing anyway. It makes Details panels, logs, and graphs easier to audit even though equality ignores case.
An empty/None Name is not a wildcard. Supply a real tag value; otherwise a
false/empty result tells the reader nothing useful about intent.
Gameplay Tags behave differently: their dot-separated hierarchy is defined in
a central dictionary, and matching can include parent tags. Plain FName tags
do not gain hierarchy just because their text contains a dot.
What exactly comes back¶
Actor Has Tag¶
Input:
- Target: one Actor reference;
- Tag: one
Namevalue.
Output:
trueif that Actor'sTagsarray contains the Name;falseotherwise.
The node does not return the matching array entry or tell you how the tag was added. A tag set on Blueprint class defaults, on a placed instance, or at runtime is simply present in that runtime Actor's array.
Component Has Tag¶
Input:
- Target: one Actor Component reference;
- Tag: one
Namevalue.
Output:
trueif that component'sComponentTagsarray contains the Name;falseotherwise.
The declared target is ActorComponent, so it works for Scene Components,
Primitive Components, Audio Components, custom Actor Components, and other
subclasses. It does not require collision.
Get Components by Tag¶
Inputs:
- Target: one Actor whose owned components will be searched;
- Component Class: the base class results must be or inherit from;
- Tag: a Component Tag Name.
Output:
- an array declared at the chosen Component Class type;
- each runtime value remains its real subclass;
- an empty array when no owned component satisfies both tests.
A SceneComponent class filter includes Static Mesh Components and Box
Components because both inherit from Scene Component. A PrimitiveComponent
filter includes collision/rendering primitive subclasses but excludes an Audio
Component. Pick the narrowest class that honestly includes all desired results.
Set Component Class deliberately. An empty/invalid class is not a request for
"anything" and does not produce a useful component list.
Treat output order as implementation detail. If several components share the
same tag, use For Each, validate the expected count, sort by your own key, or
give them more specific tags. Do not make "index 0 is the weapon mesh" a hidden
contract.
When they return false or empty¶
The nodes have no Failed execution pin. Common causes are:
- The tag is on the wrong object. You tagged the mesh, then called
Actor Has Tagon its owner. - You used the wrong tag system. A Gameplay Tag Container is invisible to the plain Actor/Component tag nodes.
- The Name differs. Case alone is fine, but spaces, punctuation, or a different word produce another FName.
- The component class filter is too narrow. A Box Component will not pass an Audio Component filter even if both carry the same tag text.
- The component belongs to another Actor. Attachments and Child Actor
instances do not make their owned components part of the parent Actor's
Get Components by Tagsearch. - The runtime instance differs from the asset/default you inspected. A placed instance override or runtime mutation changed its array.
- The Target reference is
None. The call is skipped and Blueprint logsAccessed None; that is different from a valid target returning false or empty.
Valid-target no-match is silent. No warning, fallback class, partial spelling match, parent-tag match, or world search runs.
The pattern everyone actually uses¶
Check the exact hit component¶
For a weak point, the component owns the label:
Line Trace / Event Hit
-> Break Hit Result
-> Is Valid (Hit Component)
-> Hit Component.Component Has Tag "WeakPoint"
-> Branch
true -> apply weak-point multiplier
false -> normal damage
Checking the Hit Actor would lose the distinction between that actor's capsule, shield, body mesh, and weak-point collider.
Find a group of components on one actor¶
Target Actor.Get Components by Tag
Component Class = Primitive Component
Tag = "DamageReceiver"
-> For Each
-> bind/setup each tagged receiver component
This is useful during setup. If the graph needs the same components repeatedly, store validated references instead of searching the owned-component array on every Tick.
Identify, then call behavior safely¶
Other Actor.Actor Has Tag "Interactable"
-> Does Object Implement Interface (BPI_Interactable)
-> Interact interface message
The tag can narrow intent, but the interface is the callable contract. If the interface already answers the question, the Actor tag may be redundant.
The C++ twin, for the curious (our own example code):
void ATrainingTarget::CacheDamageReceivers()
{
DamageReceivers = GetComponentsByTag(
UPrimitiveComponent::StaticClass(),
FName(TEXT("DamageReceiver")));
for (UActorComponent* Component : DamageReceivers)
{
check(Component && Component->ComponentHasTag(
FName(TEXT("DamageReceiver"))));
}
}
Runtime changes and multiplayer¶
Tags and ComponentTags are editable arrays. Changing one changes the local
runtime instance's later query results. The query nodes themselves do not cache
an older Boolean or component array.
Plain tag arrays are not automatically replicated gameplay state. A server
adding Stunned to Actor Tags does not by itself make every client observe the
same array change.
For networked rules:
- keep authoritative state in replicated variables/components or another intentional replicated system;
- use RepNotify or state-change events to update presentation;
- use plain tags as local metadata only when every machine gets the same value from class defaults, placed data, or explicit synchronized setup;
- do not let a client-local tag check authorize damage, inventory grants, or objective completion.
Gameplay Tags also do not magically replicate merely because they are Gameplay Tags; the owning replicated property/system must define that behavior.
Cost and graph shape¶
Actor Has Tag and Component Has Tag scan one small local Name array. They
do not search the world.
Get Components by Tag walks the Target Actor's owned components and builds an
output array. It is far narrower than Get All Actors with Tag, but repeated
per-frame component searches are still needless when the component set is
stable. Find/cache at setup or keep direct component references.
Avoid using a growing vocabulary of plain tags as a substitute for structure. When a tag only exists so code can guess whether a function is safe to call, an interface or typed component is the stronger contract.
What these nodes do not do¶
- They do not search Actor Tags and Component Tags together.
- They do not query Gameplay Tag Containers.
- They do not perform partial, wildcard, or hierarchical matching.
- They do not add, remove, or replicate tags.
- They do not search components owned by every actor in the world.
- They do not recurse through attached actors or Child Actor instances.
- They do not guarantee one component, stable array order, or a non-
Noneresult. - They do not grant behavior, collision responses, abilities, interfaces, or network authority.
Lookalikes - which one do I want?¶
| Node/system | Use when | Watch out |
|---|---|---|
| Actor Has Tag | One known Actor carries a simple whole-actor label. | Does not inspect its components or Gameplay Tags. |
| Component Has Tag | One known component carries a simple part-level label. | Does not inspect the owner Actor's tags. |
| Get Components by Tag | You need all matching owned components by class + Component Tag. | Output may contain zero or several components. |
| Find Component by Tag | You need one matching owned component. | "First" depends on component order; use only when one match is an enforced invariant. |
| Get Components by Class | Class identity is enough and no tag filter is needed. | Returns every owned component of that class/subclasses. |
| Get All Actors with Tag | You need a one-time world-wide search for Actor Tags. | It scans loaded actors; do not use it as per-frame glue. |
| Gameplay Tag Has Tag / Query | You need defined hierarchical gameplay categories. | Requires a Gameplay Tag value/container, not Actor Tags. |
| Blueprint Interface | You need to call behavior on unrelated object classes. | An interface is a contract, not a label or world search. |
Rule of thumb: Actor tag for the whole actor, Component tag for one owned part, Gameplay Tag for gameplay vocabulary, and an interface/component for behavior.
Going deeper¶
- Gameplay Tags vs Actor Tags vs Component Tags - choosing the storage system before choosing the node.
- Actor, Scene, and Primitive Components - why a class filter includes subclasses and which components have collision.
- Blueprint Interfaces - behavior contracts instead of tag-driven guessing.
- Break Hit Result - getting the exact Hit Component before checking its tag.
- Get All Actors with Interface / Tag - the world-search version and its cost boundary.
- Replicated variables and RepNotify - synchronizing gameplay state instead of assuming local tag arrays replicate.
- Official docs: Actor Has Tag, Component Has Tag, Get Components by Tag, FName, and Gameplay Tags.
- Engine source (requires engine access - we do not reproduce it here):
AActor::ActorHasTagandTagsinEngine/Source/Runtime/Engine/Classes/GameFramework/Actor.h;AActor::GetComponentsByTaginEngine/Source/Runtime/Engine/Private/Actor.cpp;UActorComponent::ComponentHasTagandComponentTagsinEngine/Source/Runtime/Engine/Classes/Components/ActorComponent.h; FName comparison rules inEngine/Source/Runtime/Core/Public/UObject/NameTypes.h.