UGameplayTagsManager

Holds data about the tag dictionary, is in a singleton [UObject](API\Runtime\CoreUObject\UObject\UObject)

Windows
MacOS
Linux

Inheritance Hierarchy

UObjectBase

UObjectBaseUtility

UObject

UGameplayTagsManager

References

Module

GameplayTags

Header

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

Include

#include "GameplayTagsManager.h"

Syntax

class UGameplayTagsManager : public UObject

Remarks

Holds data about the tag dictionary, is in a singleton UObject

Variables

Name Description

Public variable

FGameplayTagNet...

 

InvalidTagNetIndex

This is the actual value for an invalid tag "None".

Public variable

int32

 

NetIndexFirstBitSegment

The length in bits of the first segment when net serializing tags.

Public variable

int32

 

NetIndexTrueBitNum

Cached number of bits we need to replicate tags.

Public variable

int32

 

NumBitsForContainerSize

Numbers of bits to use for replicating container size. This can be set via config.

Public variable

FOnFilterGamepl...

 

OnFilterGameplayTagChildren

Public variable

FOnGameplayTagL...

 

OnGameplayTagLoadedDelegate

Public variable

FOnGameplayTagD...

 

OnGatherGameplayTagDoubleClickedEditor

Public variable

FOnGetCategorie...

 

OnGetCategoriesMetaFromPropertyHandle

Public variable

TMap< FGameplay...

 

ReplicationCountMap

Public variable

TMap< FGameplay...

 

ReplicationCountMap_Containers

Public variable

TMap< FGameplay...

 

ReplicationCountMap_SingleTags

Constructors

Name Description

Public function

UGameplayTagsManager

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Name Description

Public function

~UGameplayTagsManager()

Destructor

Functions

Name Description

Public function

FGameplayTag

 

AddNativeGameplayTag

(
    FName TagName,
    const FString& TagDevComment
)

Registers the given name as a gameplay tag, and tracks that it is being directly referenced from code This can only be called during engine initialization, the table needs to be locked down before replication

Public function

void

 

AddTagIniSearchPath

(
    const FString& RootDir
)

Loads tag inis contained in the specified path

Public function

void

 

CallOrRegister_OnDoneAddingNativeTagsDelegate

(
    FSimpleMulticastDelegate::FDelegate...
)

Public function

void

 

ConstructGameplayTagTree()

Helper function to construct the gameplay tag tree

Public function

void

 

DestroyGameplayTagTree()

Helper function to destroy the gameplay tag tree

Public function

void

 

DoneAddingNativeTags()

Call to flush the list of native tags, once called it is unsafe to add more

Public function

void

 

EditorRefreshGameplayTagTree()

Refresh the gameplaytag tree due to an editor change

Public function Const

FGameplayTag

 

FindGameplayTagFromPartialString_Slow

(
    FString PartialString
)

Searches for a gameplay tag given a partial string.

Public function Const

TSharedPtr< ...

 

FindTagNode

(
    FName TagName
)

Checks node tree to see if a FGameplayTagNode with the name exists

Public function Const

TSharedPtr< ...

 

FindTagNode

(
    const FGameplayTag& GameplayTag
)

Checks node tree to see if a FGameplayTagNode with the tag exists

Public function Const

const FGamep...

 

FindTagSource

(
    FName TagSourceName
)

Returns the tag source for a given tag source name and type, or null if not found

Public function

FGameplayTag...

 

FindTagSource

(
    FName TagSourceName
)

Returns the tag source for a given tag source name and type, or null if not found

Public function Const

void

 

FindTagSourcesWithType

(
    EGameplayTagSourceType TagSourceTyp...,
    TArray< const FGameplayTagSource&#...
)

Fills in an array with all tag sources of a specific type

Public function Const

void

 

GameplayTagContainerLoaded

(
    FGameplayTagContainer& Container,
    FProperty* SerializingProperty
)

Notification that a tag container has been loaded via serialize

Public function Const

int32

 

GameplayTagsMatchDepth

(
    const FGameplayTag& GameplayTagOne,
    const FGameplayTag& GameplayTagTwo
)

Check to see how closely two FGameplayTags match.

Public function Static

UGameplayTag...

 

Get()

Returns the global UGameplayTagsManager manager

Public function Const

void

 

GetAllTagsFromSource

(
    FName TagSource,
    TArray< TSharedPtr< FGameplayTagNod...
)

Gets a list of all gameplay tag nodes added by the specific source

Public function Const

FString

 

GetCategoriesMetaFromField

(
    TFieldType* Field
)

Returns "Categories" meta property from given field, used for filtering by tag widget

Public function Const

FString

 

GetCategoriesMetaFromFunction

(
    const UFunction* Func,
    FName ParamName
)

Returns "GameplayTagFilter" meta property from given function, used for filtering by tag widget for any parameters of the function that end up as BP pins

Public function Const

FString

 

GetCategoriesMetaFromPropertyHandle

(
    TSharedPtr< class IPropertyHandle >...
)

Returns "Categories" meta property from given handle, used for filtering by tag widget

Public function Const

void

 

GetFilteredGameplayRootTags

(
    const FString& InFilterString,
    TArray< TSharedPtr< FGameplayTagNod...
)

Gets a Filtered copy of the GameplayRootTags Array based on the comma delimited filter string passed in

Public function Static

UGameplayTag...

 

GetIfAllocated()

Returns possibly nullptr to the manager. Needed for some shutdown cases to avoid reallocating.

Public function Const

FGameplayTag...

 

GetNetIndexFromTag

(
    const FGameplayTag& InTag
)

Public function Const

const TArray...

 

GetNetworkGameplayTagNodeIndex()

Public function Const

uint32

 

GetNetworkGameplayTagNodeIndexHash()

Returns the hash of NetworkGameplayTagNodeIndex

Public function Const

void

 

GetOwnersForTagSource

(
    const FString& SourceName,
    TArray< FString >& OutOwners
)

Returns a list of the owners for a restricted tag config file. May be empty

Public function Const

void

 

GetRestrictedTagConfigFiles

(
    TArray< FString >& RestrictedConfi...
)

Returns a list of the ini files that contain restricted tags

Public function Const

void

 

GetRestrictedTagSources

(
    TArray< const FGameplayTagSource&#...
)

Returns a list of the source files that contain restricted tags

Public function Const

const FGamep...

 

GetSingleTagContainer

(
    const FGameplayTag& GameplayTag
)

Helper function to get the stored TagContainer containing only this tag, which has searchable ParentTags

Public function Const

bool

 

GetTagEditorData

(
    FName TagName,
    FString& OutComment,
    FName& OutTagSource,
    bool& bOutIsTagExplicit,
    bool& bOutIsRestrictedTag,
    bool& bOutAllowNonRestrictedChildr...
)

Returns information about tag. If not found return false

Public function Const

FName

 

GetTagNameFromNetIndex

(
    FGameplayTagNetIndex Index
)

Gets a tag name from net index and vice versa, used for replication efficiency

Public function Const

bool

 

ImportSingleGameplayTag

(
    FGameplayTag& Tag,
    FName ImportedTagName
)

Handles establishing a single tag from an imported tag name (accounts for redirects too).

Public function Const

bool

 

IsDictionaryTag

(
    FName TagName
)

Returns true if this tag is directly in the dictionary already

Public function Const

bool

 

IsNativelyAddedTag

(
    FGameplayTag Tag
)

Public function

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

void

 

LoadGameplayTagTables

(
    bool bAllowAsyncLoad
)

Loads the tag tables referenced in the GameplayTagSettings object

Public function

void

 

NotifyGameplayTagDoubleClickedEditor

(
    FString TagName
)

Public function

void

 

NotifyTagReplicated

(
    FGameplayTag Tag,
    bool WasInContainer
)

Public function Static

FSimpleMulti...

 

OnLastChanceToAddNativeTags()

Public function

void

 

PrintReplicationFrequencyReport()

Mechanism for tracking what tags are frequently replicated

Public function

void

 

PrintReplicationIndices()

Public function Const

void

 

RedirectSingleGameplayTag

(
    FGameplayTag& Tag,
    FProperty* SerializingProperty
)

Handles redirectors for a single tag, will also error on invalid tag.

Public function Const

void

 

RedirectTagsForContainer

(
    FGameplayTagContainer& Container,
    FProperty* SerializingProperty
)

Handles redirectors for an entire container, will also error on invalid tags

Public function Const

void

 

RequestAllGameplayTags

(
    FGameplayTagContainer& TagContaine...,
    bool OnlyIncludeDictionaryTags
)

Gets the list of all tags in the dictionary

Public function Const

FGameplayTag

 

RequestGameplayTag

(
    FName TagName,
    bool ErrorIfNotFound
)

Gets the FGameplayTag that corresponds to the TagName

Public function Const

FGameplayTag...

 

RequestGameplayTagChildren

(
    const FGameplayTag& GameplayTag
)

Gets a Tag Container containing the all tags in the hierarchy that are children of this tag.

Public function Const

FGameplayTag...

 

RequestGameplayTagChildrenInDictionary

(
    const FGameplayTag& GameplayTag
)

Gets a Tag Container containing all of the tags in the hierarchy that are children of this tag, and were explicitly added to the dictionary

Public function Const

void

 

RequestGameplayTagContainer

(
    const TArray< FString >& TagString...,
    FGameplayTagContainer& OutTagsCont...,
    bool bErrorIfNotFound
)

Adds the gameplay tags corresponding to the strings in the array TagStrings to OutTagsContainer

Public function Const

FGameplayTag...

 

RequestGameplayTagDirectDescendantsInDictionary

(
    const FGameplayTag& GameplayTag,
    EGameplayTagSelectionType Selection...
)

Gets a Tag Container containing all of the tags in the hierarchy that are children of this tag, were explicitly added to the dictionary, and do not have any explicitly added tags between them and the specified tag

Public function Const

FGameplayTag

 

RequestGameplayTagDirectParent

(
    const FGameplayTag& GameplayTag
)

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

Public function Const

FGameplayTag...

 

RequestGameplayTagParents

(
    const FGameplayTag& GameplayTag
)

Gets a Tag Container containing the supplied tag and all of it's parents as explicit tags

Public function Const

bool

 

ShouldImportTagsFromINI()

Returns true if we should import tags from UGameplayTagsSettings objects (configured by INI files)

Public function Const

bool

 

ShouldUseFastReplication()

Should use fast replication

Public function Const

bool

 

ShouldWarnOnInvalidTags()

Should we print loading errors when trying to load invalid tags

Public function

bool

 

ShowGameplayTagAsHyperLinkEditor

(
    FString TagName
)

Public function Const

void

 

SingleGameplayTagLoaded

(
    FGameplayTag& Tag,
    FProperty* SerializingProperty
)

Notification that a gameplay tag has been loaded via serialize

Public function Const

void

 

SplitGameplayTagFName

(
    const FGameplayTag& Tag,
    TArray< FName >& OutNames
)

Splits a tag such as x.y.z into an array of names {x,y,z}

Public function Static

FString

 

StaticGetCategoriesMetaFromPropertyHandle

(
    TSharedPtr< class IPropertyHandle >...
)

Helper function, made to be called by custom OnGetCategoriesMetaFromPropertyHandle handlers

Public function Const

bool

 

ValidateTagCreation

(
    FName TagName
)

Returns true if if the passed in name is in the tag dictionary and can be created

Typedefs

Name

Description

FOnFilterGameplayTagChildren

Allows dynamic hiding of gameplay tags in SGameplayTagWidget.

FOnGameplayTagDoubleClickedEditor

FOnGameplayTagLoaded

FOnGetCategoriesMetaFromPropertyHandle

Chance to dynamically change filter string based on a property handle

Constants

Name

Description

NAME_Categories

NAME_GameplayTagFilter

OnEditorRefreshGameplayTagTree

This is called when EditorRefreshGameplayTagTree.

SingletonManager

The Tag Manager singleton

Deprecated Functions

Name Description

Public function Const

bool

 

GameplayTagsMatch

(
    const FGameplayTag& GameplayTagOne,
    TEnumAsByte< EGameplayTagMatchType:...,
    const FGameplayTag& GameplayTagTwo,
    TEnumAsByte< EGameplayTagMatchType:...
)

Call MatchesTag on FGameplayTag instead

Public function Const

FString

 

GetCategoriesMetaFromStruct

(
    UScriptStruct* Struct
)

Please call GetCategoriesMetaFromField instead.

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