Navigation
API > API/Runtime > API/Runtime/GameplayTags
Holds data about the tag dictionary, is in a singleton UObject
| Name | UGameplayTagsManager |
| Type | class |
| Header File | /Engine/Source/Runtime/GameplayTags/Classes/GameplayTagsManager.h |
| Include Path | #include "GameplayTagsManager.h" |
Syntax
UCLASS (Config=Engine, MinimalAPI)
class UGameplayTagsManager : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UGameplayTagsManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UGameplayTagsManager
(
const FObjectInitializer& ObjectInitializer |
GameplayTagsManager.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~UGameplayTagsManager() |
Destructor | GameplayTagsManager.h |
Structs
| Name | Remarks |
|---|---|
| FFilterGameplayTagContext | This is a container to filter out gameplay tags when they are invalid or when they don't meet the filter string If used from editor to filter out tags when picking them the FilterString is optional and the ReferencingPropertyHandle is required If used to validate an asset / assets you can provide the TagSourceAssets. |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnFilterGameplayTag | TMulticastDelegate_TwoParams< void, const FFilterGameplayTagContext &, bool & > | Allows dynamic hiding of gameplay tags in SGameplayTagWidget. | GameplayTagsManager.h |
| FOnFilterGameplayTagChildren | TMulticastDelegate_ThreeParams< void, const FString &, TSharedPtr< FGameplayTagNode > &, bool & > | Allows dynamic hiding of gameplay tags in SGameplayTagWidget. | GameplayTagsManager.h |
| FOnGameplayTagDoubleClickedEditor | TMulticastDelegate_TwoParams< void, FGameplayTag, FSimpleMulticastDelegate & > | GameplayTagsManager.h | |
| FOnGetCategoriesMetaFromPropertyHandle | TMulticastDelegate_TwoParams< void, TSharedPtr< IPropertyHandle >, FString & > | Chance to dynamically change filter string based on a property handle | GameplayTagsManager.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| NAME_Categories | const FName | GameplayTagsManager.h | |
| NAME_GameplayTagFilter | const FName | GameplayTagsManager.h | |
| OnEditorRefreshGameplayTagTree | FSimpleMulticastDelegate | This is called after EditorRefreshGameplayTagTree. | GameplayTagsManager.h |
| SingletonManager | UGameplayTagsManager * | The Tag Manager singleton | GameplayTagsManager.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| NumBitsForContainerSize | int32 | Numbers of bits to use for replicating container size. This can be set via config. | GameplayTagsManager.h | |
| OnFilterGameplayTag | FOnFilterGameplayTag | GameplayTagsManager.h | ||
| OnFilterGameplayTagChildren | FOnFilterGameplayTagChildren | GameplayTagsManager.h | ||
| OnGatherGameplayTagDoubleClickedEditor | FOnGameplayTagDoubleClickedEditor | GameplayTagsManager.h | ||
| OnGetCategoriesMetaFromPropertyHandle | FOnGetCategoriesMetaFromPropertyHandle | GameplayTagsManager.h | ||
| ReplicationCountMap | TMap< FGameplayTag, int32 > | GameplayTagsManager.h | ||
| ReplicationCountMap_Containers | TMap< FGameplayTag, int32 > | GameplayTagsManager.h | ||
| ReplicationCountMap_SingleTags | TMap< FGameplayTag, int32 > | GameplayTagsManager.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDeferBroadcastOnGameplayTagTreeChanged | int32 | GameplayTagsManager.h | ||
| bDoneAddingNativeTags | bool | True if native tags have all been added and flushed | GameplayTagsManager.h | |
| bEditorRefreshGameplayTagTreeRequestedDuringSuspend | bool | GameplayTagsManager.h | ||
| bIsConstructingGameplayTagTree | bool | GameplayTagsManager.h | ||
| bNeedsTreeRebuildOnDoneAddingGameplayTags | bool | If true, an action that would require a tree rebuild was performed during initialization | GameplayTagsManager.h | |
| bNetworkIndexInvalidated | bool | GameplayTagsManager.h | ||
| bShouldAllowUnloadingTags | bool | Cached runtime value for whether we should allow unloading of tags | GameplayTagsManager.h | |
| bShouldBroadcastDeferredOnGameplayTagTreeChanged | bool | GameplayTagsManager.h | ||
| bShouldWarnOnInvalidTags | bool | Cached runtime value for whether we should warn when loading invalid tags | GameplayTagsManager.h | |
| bUseDynamicReplication | bool | Cached runtime value for whether we are using dynamic replication or not. | GameplayTagsManager.h | |
| bUseFastReplication | bool | Cached runtime value for whether we are using fast replication or not. | GameplayTagsManager.h | |
| CommonlyReplicatedTags | TArray< FGameplayTag > | Our aggregated, sorted list of commonly replicated tags. | GameplayTagsManager.h | |
| EditorRefreshGameplayTagTreeSuspendTokens | TSet< FGuid > | GameplayTagsManager.h | ||
| GameplayRootTag | TSharedPtr< FGameplayTagNode > | Roots of gameplay tag nodes | GameplayTagsManager.h | |
| GameplayTagMapCritical | FTransactionallySafeCriticalSection | This critical section is to handle an issue where tag requests come from another thread when async loading from a background thread in FGameplayTagContainer::Serialize. | GameplayTagsManager.h | |
| GameplayTagNodeMap | TMap< FGameplayTag, TSharedPtr< FGameplayTagNode > > | Map of Tags to Nodes - Internal use only. | GameplayTagsManager.h | |
| GameplayTagTables | TArray< TObjectPtr< UDataTable > > | Holds all of the valid gameplay-related tags that can be applied to assets | GameplayTagsManager.h | |
| IncrementalCookHash | FBlake3Hash | GameplayTagsManager.h | ||
| InvalidTagCharacters | FString | String with outlawed characters inside tags | GameplayTagsManager.h | |
| InvalidTagNetIndex | FGameplayTagNetIndex | This is the actual value for an invalid tag "None". | GameplayTagsManager.h | |
| LegacyNativeTags | TSet< FName > | Tag Sources. | GameplayTagsManager.h | |
| NetIndexFirstBitSegment | int32 | The length in bits of the first segment when net serializing tags. | GameplayTagsManager.h | |
| NetIndexTrueBitNum | int32 | Cached number of bits we need to replicate tags. | GameplayTagsManager.h | |
| NetworkGameplayTagNodeIndex | TArray< TSharedPtr< FGameplayTagNode > > | Sorted list of nodes, used for network replication | GameplayTagsManager.h | |
| NetworkGameplayTagNodeIndexHash | uint32 | GameplayTagsManager.h | ||
| RegisteredSearchPaths | TMap< FString, FGameplayTagSearchPathInfo > | Map of all config directories to load tag inis from | GameplayTagsManager.h | |
| RestrictedGameplayTagSourceNames | TSet< FName > | GameplayTagsManager.h | ||
| ShouldAllowUnloadingTagsOverride | TOptional< bool > | Augments usage of bShouldAllowUnloadingTags to allow runtime overrides to allow/disallow unloading of GameplayTags in controlled scenarios | GameplayTagsManager.h | |
| ShouldDeferGameplayTagTreeRebuilds | TOptional< bool > | Used to suppress calls to HandleGameplayTagTreeChanged that would result in a complete rebuild of the GameplayTag tree | GameplayTagsManager.h | |
| TagSources | TMap< FName, FGameplayTagSource > | Map of gameplay tag source names to source objects | GameplayTagsManager.h | |
| TransientEditorTags | TSet< FName > | Transient editor-only tags to support quick-iteration PIE workflows. | GameplayTagsManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGameplayTag AddNativeGameplayTag
(
FName TagName, |
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 | GameplayTagsManager.h | |
| Loads tag inis contained in the specified path, passes an optional PluginConfigCache to speed up disk searches | GameplayTagsManager.h | ||
FDelegateHandle CallOrRegister_OnDoneAddingNativeTagsDelegate
(
const FSimpleMulticastDelegate::FDelegate& Delegate |
Register a callback for when native tags are done being added (this is also a safe point to consider that the gameplay tags have fully been initialized). | GameplayTagsManager.h | |
void ClearShouldDeferGameplayTagTreeRebuilds
(
bool bRebuildTree |
Stops suppressing GameplayTag tree rebuilds and (optionally) rebuilds the tree | GameplayTagsManager.h | |
void ClearShouldUnloadTagsOverride() |
Clears runtime overrides, reverting to bShouldAllowUnloadingTags when determining GameplayTags unload behavior | GameplayTagsManager.h | |
void ConstructGameplayTagTree() |
Helper function to construct the gameplay tag tree | GameplayTagsManager.h | |
| Used for incremental cooking. | GameplayTagsManager.h | ||
DECLARE_TS_MULTICAST_DELEGATE_OneParam
(
FOnGameplayTagLoaded, |
GameplayTagsManager.h | ||
void DestroyGameplayTagTree() |
Helper function to destroy the gameplay tag tree | GameplayTagsManager.h | |
void DoneAddingNativeTags() |
Call to flush the list of native tags, once called it is unsafe to add more | GameplayTagsManager.h | |
void DumpSources
(
FOutputDevice& Out |
Implementation of console command GameplayTags.DumpSources | GameplayTagsManager.h | |
void EditorRefreshGameplayTagTree() |
Refresh the gameplaytag tree due to an editor change | GameplayTagsManager.h | |
bool ExtractParentTags
(
const FGameplayTag& GameplayTag, |
Fills in an array of gameplay tags with all of tags that are the parents of the passed in tag. | GameplayTagsManager.h | |
FGameplayTag FindGameplayTagFromPartialString_Slow
(
FString PartialString |
Searches for a gameplay tag given a partial string. | GameplayTagsManager.h | |
TSharedPtr< FGameplayTagNode > FindTagNode
(
const FGameplayTag& GameplayTag |
Checks node tree to see if a FGameplayTagNode with the tag exists | GameplayTagsManager.h | |
TSharedPtr< FGameplayTagNode > FindTagNode
(
FName TagName |
Checks node tree to see if a FGameplayTagNode with the name exists | GameplayTagsManager.h | |
const FGameplayTagSource * FindTagSource
(
FName TagSourceName |
Returns the tag source for a given tag source name and type, or null if not found | GameplayTagsManager.h | |
FGameplayTagSource * FindTagSource
(
FName TagSourceName |
Returns the tag source for a given tag source name and type, or null if not found | GameplayTagsManager.h | |
void FindTagSourcesWithType
(
EGameplayTagSourceType TagSourceType, |
Fills in an array with all tag sources of a specific type | GameplayTagsManager.h | |
void FindTagsWithSource
(
FStringView PackageNameOrPath, |
GameplayTagsManager.h | ||
void GameplayTagContainerLoaded
(
FGameplayTagContainer& Container, |
Notification that a tag container has been loaded via serialize | GameplayTagsManager.h | |
int32 GameplayTagsMatchDepth
(
const FGameplayTag& GameplayTagOne, |
Check to see how closely two FGameplayTags match. | GameplayTagsManager.h | |
void GetAllTagsFromSource
(
FName TagSource, |
Gets a list of all gameplay tag nodes added by the specific source | GameplayTagsManager.h | |
FString GetCategoriesMetaFromPropertyHandle
(
TSharedPtr< class IPropertyHandle > PropertyHandle |
Returns "Categories" meta property from given handle, used for filtering by tag widget | GameplayTagsManager.h | |
void GetFilteredGameplayRootTags
(
const FString& InFilterString, |
Gets a Filtered copy of the GameplayRootTags Array based on the comma delimited filter string passed in | GameplayTagsManager.h | |
FGameplayTagNetIndex GetInvalidTagNetIndex () |
This is the actual value for an invalid tag "None". | GameplayTagsManager.h | |
int32 GetNetIndexFirstBitSegment () |
The length in bits of the first segment when net serializing tags. | GameplayTagsManager.h | |
FGameplayTagNetIndex GetNetIndexFromTag
(
const FGameplayTag& InTag |
GameplayTagsManager.h | ||
int32 GetNetIndexTrueBitNum () |
Cached number of bits we need to replicate tags. | GameplayTagsManager.h | |
const TArray< TSharedPtr< FGameplayTagNode > > & GetNetworkGameplayTagNodeIndex() |
GameplayTagsManager.h | ||
uint32 GetNetworkGameplayTagNodeIndexHash() |
Returns the hash of NetworkGameplayTagNodeIndex | GameplayTagsManager.h | |
int32 GetNumberOfTagNodes
(
const FGameplayTag& GameplayTag |
Returns the number of parents a particular gameplay tag has. | GameplayTagsManager.h | |
int32 GetNumGameplayTagNodes() |
GameplayTagsManager.h | ||
int32 GetNumTagSourceSearchPaths() |
Gets the number of tag source search paths | GameplayTagsManager.h | |
| Returns a list of the owners for a restricted tag config file. May be empty | GameplayTagsManager.h | ||
| Returns a list of the ini files that contain restricted tags | GameplayTagsManager.h | ||
void GetRestrictedTagSources
(
TArray< const FGameplayTagSource* >& Sources |
Returns a list of the source files that contain restricted tags | GameplayTagsManager.h | |
const FGameplayTagContainer * GetSingleTagContainer
(
const FGameplayTag& GameplayTag |
GameplayTagsManager.h | ||
bool GetTagEditorData
(
FName TagName, |
Returns information about tag. If not found return false | GameplayTagsManager.h | |
bool GetTagEditorData
(
FName TagName, |
Returns information about tag. If not found return false | GameplayTagsManager.h | |
FName GetTagNameFromNetIndex
(
FGameplayTagNetIndex Index |
Gets a tag name from net index and vice versa, used for replication efficiency | GameplayTagsManager.h | |
| Gets all the current directories to look for tag sources in | GameplayTagsManager.h | ||
bool ImportSingleGameplayTag
(
FGameplayTag& Tag, |
Handles establishing a single tag from an imported tag name (accounts for redirects too). | GameplayTagsManager.h | |
bool IsDictionaryTag
(
FName TagName |
Returns true if this tag was explicitly registered, this is false for implictly added parent tags | GameplayTagsManager.h | |
bool IsValidGameplayTagString
(
const FStringView& TagString, |
GameplayTagsManager.h | ||
bool IsValidGameplayTagString
(
const TCHAR* TagString, |
Returns true if this is a valid gameplay tag string (foo.bar.baz). If false, it will fill | GameplayTagsManager.h | |
bool IsValidGameplayTagString
(
const FString& TagString, |
GameplayTagsManager.h | ||
void LoadGameplayTagTables
(
bool bAllowAsyncLoad |
Loads the tag tables referenced in the GameplayTagSettings object | GameplayTagsManager.h | |
void NotifyGameplayTagDoubleClickedEditor
(
FString TagName |
GameplayTagsManager.h | ||
void NotifyTagReplicated
(
FGameplayTag Tag, |
GameplayTagsManager.h | ||
void PopDeferOnGameplayTagTreeChangedBroadcast() |
GameplayTagsManager.h | ||
void PrintReplicationFrequencyReport() |
Mechanism for tracking what tags are frequently replicated | GameplayTagsManager.h | |
void PrintReplicationIndices() |
GameplayTagsManager.h | ||
void PushDeferOnGameplayTagTreeChangedBroadcast() |
GameplayTagsManager.h | ||
void RedirectSingleGameplayTag
(
FGameplayTag& Tag, |
Handles redirectors for a single tag, will also error on invalid tag. | GameplayTagsManager.h | |
void RedirectTagsForContainer
(
FGameplayTagContainer& Container, |
Handles redirectors for an entire container, will also error on invalid tags | GameplayTagsManager.h | |
bool RemoveTagIniSearchPath
(
const FString& RootDir |
Tries to remove the specified search path, will return true if anything was removed | GameplayTagsManager.h | |
void RequestAllGameplayTags
(
FGameplayTagContainer& TagContainer, |
Gets the list of all registered tags, setting OnlyIncludeDictionaryTags will exclude implicitly added tags if possible | GameplayTagsManager.h | |
FGameplayTag RequestGameplayTag
(
FName TagName, |
Gets the FGameplayTag that corresponds to the TagName | GameplayTagsManager.h | |
FGameplayTagContainer RequestGameplayTagChildren
(
const FGameplayTag& GameplayTag |
Gets a Tag Container containing the all tags in the hierarchy that are children of this tag. | GameplayTagsManager.h | |
FGameplayTagContainer 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 | GameplayTagsManager.h | |
void RequestGameplayTagContainer
(
const TArray< FString >& TagStrings, |
Adds the gameplay tags corresponding to the strings in the array TagStrings to OutTagsContainer | GameplayTagsManager.h | |
FGameplayTagContainer RequestGameplayTagDirectDescendantsInDictionary
(
const FGameplayTag& GameplayTag, |
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 | GameplayTagsManager.h | |
FGameplayTag RequestGameplayTagDirectParent
(
const FGameplayTag& GameplayTag |
Returns direct parent GameplayTag of this GameplayTag, calling on x.y will return x | GameplayTagsManager.h | |
FGameplayTagContainer RequestGameplayTagParents
(
const FGameplayTag& GameplayTag |
Gets a Tag Container containing the supplied tag and all of its parents as explicit tags. | GameplayTagsManager.h | |
void ResumeEditorRefreshGameplayTagTree
(
FGuid SuspendToken |
Resumes EditorRefreshGameplayTagTree requests; triggers a refresh if a request was made while it was suspended | GameplayTagsManager.h | |
void SetShouldDeferGameplayTagTreeRebuilds
(
bool bShouldDeferRebuilds |
Pushes an override that suppresses calls to HandleGameplayTagTreeChanged that would result in a complete rebuild of the GameplayTag tree | GameplayTagsManager.h | |
void SetShouldUnloadTagsOverride
(
bool bShouldUnloadTags |
Pushes an override that supersedes bShouldAllowUnloadingTags to allow/disallow unloading of GameplayTags in controlled scenarios | GameplayTagsManager.h | |
bool ShouldClearInvalidTags() |
Should we clear references to invalid tags loaded/saved in the editor | GameplayTagsManager.h | |
bool ShouldImportTagsFromINI() |
Returns true if we should import tags from UGameplayTagsSettings objects (configured by INI files) | GameplayTagsManager.h | |
bool ShouldUnloadTags() |
If we are allowed to unload tags | GameplayTagsManager.h | |
bool ShouldUseDynamicReplication() |
Should use dynamic replication (Gameplay Tags need not match between client/server) | GameplayTagsManager.h | |
bool ShouldUseFastReplication() |
Should use fast replication | GameplayTagsManager.h | |
bool ShouldWarnOnInvalidTags() |
Should we print loading errors when trying to load invalid tags | GameplayTagsManager.h | |
bool ShowGameplayTagAsHyperLinkEditor
(
FString TagName |
GameplayTagsManager.h | ||
void SingleGameplayTagLoaded
(
FGameplayTag& Tag, |
Notification that a gameplay tag has been loaded via serialize | GameplayTagsManager.h | |
void SplitGameplayTagFName
(
const FGameplayTag& Tag, |
Splits a tag such as x.y.z into an array of names {x,y,z} | GameplayTagsManager.h | |
void SuspendEditorRefreshGameplayTagTree
(
FGuid SuspendToken |
Suspends EditorRefreshGameplayTagTree requests | GameplayTagsManager.h | |
bool ValidateTagCreation
(
FName TagName |
Returns true if if the passed in name is in the tag dictionary and can be created | GameplayTagsManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static UGameplayTagsManager & Get() |
Returns the global UGameplayTagsManager manager | GameplayTagsManager.h | |
static FString GetCategoriesMetaFromField
(
TFieldType* Field |
Returns "Categories" meta property from given field, used for filtering by tag widget | GameplayTagsManager.h | |
| 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 | GameplayTagsManager.h | ||
static UGameplayTagsManager * GetIfAllocated() |
Returns possibly nullptr to the manager. Needed for some shutdown cases to avoid reallocating. | GameplayTagsManager.h | |
static void InitializeManager() |
Initializes the manager | GameplayTagsManager.h | |
static FSimpleMulticastDelegate & OnDoneAddingNativeTagsDelegate() |
Finished loading/adding native tags | GameplayTagsManager.h | |
static FSimpleMulticastDelegate & OnLastChanceToAddNativeTags() |
This is a delegate that is called during initialization/initial loading and signals the last chance to add tags before we are considered to be fully loaded (all tags registered). | GameplayTagsManager.h | |
static FString StaticGetCategoriesMetaFromPropertyHandle
(
TSharedPtr< class IPropertyHandle > PropertyHandle |
Helper function, made to be called by custom OnGetCategoriesMetaFromPropertyHandle handlers | GameplayTagsManager.h |