Navigation
Unreal Engine C++ API Reference > Runtime > GameplayTags > FGameplayTagContainer
References
Module | GameplayTags |
Header | /Engine/Source/Runtime/GameplayTags/Classes/GameplayTagContainer.h |
Include | #include "GameplayTagContainer.h" |
Source | /Engine/Source/Runtime/GameplayTags/Private/GameplayTagContainer.cpp |
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
Name | 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. |