FGameplayTag

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"))

Inheritance Hierarchy

FGameplayTag

FUITag

FUIActionTag

References

Module

GameplayTags

Header

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

Include

#include "GameplayTagContainer.h"

Syntax

struct FGameplayTag

Remarks

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"))

Variables

Name Description

Protected variable

FName

 

TagName

This Tags Name

Constructors

Name Description

Public function

FGameplayTag()

Constructors

Protected function

FGameplayTag

(
    const FName& InTagName
)

Intentionally private so only the tag manager can use

Functions

Name Description

Public function

void

 

FromExportString

(
    const FString& ExportString,
    int32 PortFlags
)

Sets from a ImportText string, used in asset registry

Public function Const

FGameplayTag...

 

GetGameplayTagParents()

Returns a new container explicitly containing the tags of this tag

Public function Const

const FGamep...

 

GetSingleTagContainer()

Returns reference to a GameplayTagContainer containing only this tag

Public function Const

FName

 

GetTagName()

Get the tag represented as a name

Public function

bool

 

ImportTextItem

(
    const TCHAR*& Buffer,
    int32 PortFlags,
    UObject* Parent,
    FOutputDevice* ErrorText
)

Handles importing tag strings without (TagName=) in it

Public function Const

bool

 

IsValid()

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

Public function Static

bool

 

IsValidGameplayTagString

(
    const FString& TagString,
    FText* OutError,
    FString* OutFixedString
)

Returns true if this is a valid gameplay tag string (foo.bar.baz). If false, it will fill

Public function Const

bool

 

MatchesAny

(
    const FGameplayTagContainer& Conta...
)

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

Public function Const

bool

 

MatchesAnyExact

(
    const FGameplayTagContainer& Conta...
)

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

Public function Const

bool

 

MatchesTag

(
    const FGameplayTag& TagToCheck
)

Determine if this tag matches TagToCheck, expanding our 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

Public function Const

int32

 

MatchesTagDepth

(
    const FGameplayTag& TagToCheck
)

Check to see how closely two FGameplayTags match.

Public function Const

bool

 

MatchesTagExact

(
    const FGameplayTag& TagToCheck
)

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

Public function

bool

 

NetSerialize

(
    FArchive& Ar,
    UPackageMap* Map,
    bool& bOutSuccess
)

Overridden for fast serialize

Public function

bool

 

NetSerialize_Packed

(
    FArchive& Ar,
    UPackageMap* Map,
    bool& bOutSuccess
)

Public function

void

 

PostSerialize

(
    const FArchive& Ar
)

Handles fixup and errors.

Public function Const

FGameplayTag

 

RequestDirectParent()

Returns direct parent GameplayTag of this GameplayTag, calling on x.y will return x

Public function Static

FGameplayTag

 

RequestGameplayTag

(
    const FName& TagName,
    bool ErrorIfNotFound
)

Gets the FGameplayTag that corresponds to the TagName

Public function

bool

 

SerializeFromMismatchedTag

(
    const FPropertyTag& Tag,
    FStructuredArchive::FSlot Slot
)

Used to upgrade a Name property to a GameplayTag struct property

Public function Const

FString

 

ToString()

Displays gameplay tag as a string for blueprint graph usage

Operators

Name Description

Public function Const

bool

 

operator!=

(
    FGameplayTag const& Other
)

Public function Const

bool

 

operator<

(
    FGameplayTag const& Other
)

Public function Const

bool

 

operator==

(
    FGameplayTag const& Other
)

Operators

Constants

Name

Description

EmptyTag

An empty Gameplay Tag

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel