![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <GameplayTagContainer.h>
Inheritance diagram for FGameplayTag:Static Public Member Functions | |
| static GAMEPLAYTAGS_API FGameplayTag | RequestGameplayTag (const FName &TagName, bool ErrorIfNotFound=true) |
| static GAMEPLAYTAGS_API bool | IsValidGameplayTagString (const FString &TagString, FText *OutError=nullptr, FString *OutFixedString=nullptr) |
Static Public Attributes | |
| static GAMEPLAYTAGS_API const FGameplayTag | EmptyTag |
Protected Member Functions | |
| bool | NetSerialize_ForReplayUsingFastReplication (FArchive &Ar, class UPackageMapClient &PackageMapClient) |
| GAMEPLAYTAGS_API | FGameplayTag (const FName &InTagName) |
Protected Attributes | |
| FName | TagName |
Friends | |
| class | UGameplayTagsManager |
| class | FGameplayTagRedirectors |
| class | FNativeGameplayTag |
| struct | FGameplayTagContainer |
| struct | FGameplayTagNode |
| uint32 | GetTypeHash (const FGameplayTag &Tag) |
| FArchive & | operator<< (FArchive &Ar, FGameplayTag &GameplayTag) |
| void | operator<< (FStructuredArchive::FSlot Slot, FGameplayTag &GameplayTag) |
A single gameplay tag, which represents a hierarchical name of the form x.y that is registered in the GameplayTagsManager You can filter the gameplay tags displayed in the editor using, meta = (Categories = "Tag1.Tag2.Tag3"))
|
inline |
Constructors
|
explicitprotected |
Intentionally private so only the tag manager can use
Sets from a ImportText string, used in asset registry
| FGameplayTagContainer FGameplayTag::GetGameplayTagParents | ( | ) | const |
Returns a new tag container that includes this tag and all parent tags as explicitly added tags. For example, calling this on x.y.z would return a tag container with x.y.z, x.y, and x
| FGameplayTagContainer FGameplayTag::GetSingleTagContainer | ( | ) | const |
Returns a GameplayTagContainer containing only this tag
| FName FGameplayTag::GetTagLeafName | ( | ) | const |
Parses the tag name and returns the name of the leaf. For example, calling this on x.y.z would return the z component.
|
inline |
Get the tag represented as a name
| bool FGameplayTag::ImportTextItem | ( | const TCHAR *& | Buffer, |
| int32 | PortFlags, | ||
| UObject * | Parent, | ||
| FOutputDevice * | ErrorText | ||
| ) |
Handles importing tag strings without (TagName=) in it
|
inline |
Returns whether the tag is valid or not; Invalid tags are set to NAME_None and do not exist in the game-specific global dictionary
|
static |
Returns true if this is a valid gameplay tag string (foo.bar.baz). If false, it will fill
| TagString | String to check for validity |
| OutError | If non-null and string invalid, will fill in with an error message |
| OutFixedString | If non-null and string invalid, will attempt to fix. Will be empty if no fix is possible |
| bool FGameplayTag::MatchesAny | ( | const FGameplayTagContainer & | ContainerToCheck | ) | const |
Checks if this tag matches ANY of the tags in the specified container, also checks against our parent tags "A.1".MatchesAny({"A","B"}) will return True, "A".MatchesAny({"A.1","B"}) will return False If ContainerToCheck is empty/invalid it will always return False
|
inline |
Checks if this tag matches ANY of the tags in the specified container, only allowing exact matches "A.1".MatchesAny({"A","B"}) will return False If ContainerToCheck is empty/invalid it will always return False
| bool FGameplayTag::MatchesTag | ( | const FGameplayTag & | TagToCheck | ) | const |
Determine if this tag matches TagToCheck, expanding out parent tags "A.1".MatchesTag("A") will return True, "A".MatchesTag("A.1") will return False If TagToCheck is not Valid it will always return False
| int32 FGameplayTag::MatchesTagDepth | ( | const FGameplayTag & | TagToCheck | ) | const |
Check to see how closely two FGameplayTags match. Higher values indicate more matching terms in the tags.
| TagToCheck | Tag to match against |
|
inline |
Determine if TagToCheck is valid and exactly matches this tag "A.1".MatchesTagExact("A") will return False If TagToCheck is not Valid it will always return False
| bool FGameplayTag::NetSerialize | ( | FArchive & | Ar, |
| class UPackageMap * | Map, | ||
| bool & | bOutSuccess | ||
| ) |
Overridden for fast serialize
|
protected |
| bool FGameplayTag::NetSerialize_Packed | ( | FArchive & | Ar, |
| class UPackageMap * | Map, | ||
| bool & | bOutSuccess | ||
| ) |
|
inline |
|
inline |
|
inline |
Operators
| void FGameplayTag::ParseParentTags | ( | TArray< FGameplayTag > & | UniqueParentTags | ) | const |
Parses the tag name and fills in UniqueParentTags with raw parent tags, without validating with the tag manager. For example, calling this on x.y.z would add x.y and x to UniqueParentTags if they were not already in the array
Handles fixup and errors. This is only called when not serializing a full FGameplayTagContainer
| FGameplayTag FGameplayTag::RequestDirectParent | ( | ) | const |
Returns direct parent GameplayTag of this GameplayTag, calling on x.y will return x
|
static |
Gets the FGameplayTag that corresponds to the TagName
| TagName | The Name of the tag to search for |
| ErrorIfNotfound | ensure() that tag exists. |
| bool FGameplayTag::SerializeFromMismatchedTag | ( | const FPropertyTag & | Tag, |
| FStructuredArchive::FSlot | Slot | ||
| ) |
Used to upgrade a Name property to a GameplayTag struct property
|
inline |
Displays gameplay tag as a string for blueprint graph usage
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Used so we can have a TMap of this struct
|
friend |
|
friend |
|
friend |
|
static |
An empty Gameplay Tag
|
protected |
This Tags Name