FGameplayTagContainer::AppendMatchingTags

Adds all the tags that match between the two specified containers to this container.

Windows
MacOS
Linux

References

Module

GameplayTags

Header

/Engine/Source/Runtime/GameplayTags/Classes/GameplayTagContainer.h

Include

#include "GameplayTagContainer.h"

Source

/Engine/Source/Runtime/GameplayTags/Private/GameplayTagContainer.cpp

Syntax

void AppendMatchingTags
(
    FGameplayTagContainer const & OtherA,
    FGameplayTagContainer const & OtherB
)

Remarks

Adds all the tags that match between the two specified containers to this container. WARNING: This matches any parent tag in A, not just exact matches! So while this should be the union of the container this is called on with the intersection of OtherA and OtherB, it's not exactly that. Since OtherB matches against its parents, any tag in OtherA which has a parent match with a parent of OtherB will count. For example, if OtherA has Color.Green and OtherB has Color.Red, that will count as a match due to the Color parent match! If you want an exact match, you need to call A.FilterExact(B) (above) to get the intersection of A with B. If you need the disjunctive union (the union of two sets minus their intersection), use AppendTags to create Union, FilterExact to create Intersection, and then call Union.RemoveTags(Intersection).

Parameters

Parameter

Description

OtherA

TagContainer that has the matching tags you want to add to this container, these tags have their parents expanded

OtherB

TagContainer used to check for matching tags. If the tag matches on any parent, it counts as a match.

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback