engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 静态 Public 成员函数 | 静态 Public 属性 | Protected 成员函数 | Protected 属性 | 友元 | 所有成员列表
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")) 更多...

#include <GameplayTagContainer.h>

Public 成员函数

bool ComplexMatches (TEnumAsByte< EGameplayTagMatchType::Type > MatchTypeOne, const FGameplayTag &Other, TEnumAsByte< EGameplayTagMatchType::Type > MatchTypeTwo) const
 Check to see if two FGameplayTags match 更多...
 
 FGameplayTag ()
 Constructors
 
void FromExportString (const FString &ExportString)
 Sets from a ImportText string, used in asset registry
 
FGameplayTagContainer GetGameplayTagParents () const
 Returns a new container explicitly containing the tags of this tag
 
const FGameplayTagContainer & GetSingleTagContainer () const
 Returns reference to a GameplayTagContainer containing only this tag
 
FORCEINLINE FName GetTagName () const
 Get the tag represented as a name
 
bool ImportTextItem (const TCHAR *&Buffer, int32 PortFlags, UObject *Parent, FOutputDevice *ErrorText)
 Handles importing tag strings without (TagName=) in it
 
FORCEINLINE bool IsValid () const
 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
 
PRAGMA_DISABLE_DEPRECATION_WARNINGS FORCEINLINE_DEBUGGABLE bool Matches (TEnumAsByte< EGameplayTagMatchType::Type > MatchTypeOne, const FGameplayTag &Other, TEnumAsByte< EGameplayTagMatchType::Type > MatchTypeTwo) const
 Check to see if two FGameplayTags match with explicit match types 更多...
 
bool 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 更多...
 
bool MatchesAnyExact (const FGameplayTagContainer &ContainerToCheck) const
 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 MatchesTag (const FGameplayTag &TagToCheck) const
 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 更多...
 
int32 MatchesTagDepth (const FGameplayTag &TagToCheck) const
 Check to see how closely two FGameplayTags match. 更多...
 
FORCEINLINE bool MatchesTagExact (const FGameplayTag &TagToCheck) const
 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 NetSerialize (FArchive &Ar, class UPackageMap *Map, bool &bOutSuccess)
 Overridden for fast serialize
 
FORCEINLINE bool operator== (FGameplayTag const &Other) const
 Operators
 
void PostSerialize (const FArchive &Ar)
 Handles fixup and errors. 更多...
 
FGameplayTag RequestDirectParent () const
 Returns direct parent GameplayTag of this GameplayTag, calling on x.y will return x
 
bool SerializeFromMismatchedTag (const FPropertyTag &Tag, FStructuredArchive::FSlot Slot)
 Used to upgrade a Name property to a GameplayTag struct property
 
FORCEINLINE FString ToString () const
 Displays gameplay tag as a string for blueprint graph usage
 

静态 Public 成员函数

static bool IsValidGameplayTagString (const FString &TagString, FText *OutError=nullptr, FString *OutFixedString=nullptr)
 Returns true if this is a valid gameplay tag string (foo.bar.baz). 更多...
 
static FGameplayTag RequestGameplayTag (const FName &TagName, bool ErrorIfNotFound=true)
 Gets the FGameplayTag that corresponds to the TagName 更多...
 

静态 Public 属性

static const FGameplayTag EmptyTag
 An empty Gameplay Tag
 

Protected 成员函数

 FGameplayTag (const FName &InTagName)
 Intentionally private so only the tag manager can use
 

Protected 属性

FName TagName
 This Tags Name
 

友元

struct FGameplayTagContainer
 
struct FGameplayTagNode
 
FORCEINLINE friend uint32 GetTypeHash (const FGameplayTag &Tag)
 Used so we can have a TMap of this struct
 
class UGameplayTagsManager
 

详细描述

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

成员函数说明

◆ ComplexMatches()

bool FGameplayTag::ComplexMatches ( TEnumAsByte< EGameplayTagMatchType::Type >  MatchTypeOne,
const FGameplayTag &  Other,
TEnumAsByte< EGameplayTagMatchType::Type >  MatchTypeTwo 
) const

Check to see if two FGameplayTags match

参数
MatchTypeOneHow we compare this tag, Explicitly or a match with any parents as well
OtherThe second tag to compare against
MatchTypeTwoHow we compare Other tag, Explicitly or a match with any parents as well
返回
True if there is a match according to the specified match types; false if not

◆ IsValidGameplayTagString()

static bool FGameplayTag::IsValidGameplayTagString ( const FString &  TagString,
FText *  OutError = nullptr,
FString *  OutFixedString = nullptr 
)
static

Returns true if this is a valid gameplay tag string (foo.bar.baz).

If false, it will fill

参数
TagStringString to check for validity
OutErrorIf non-null and string invalid, will fill in with an error message
OutFixedStringIf non-null and string invalid, will attempt to fix. Will be empty if no fix is possible
返回
True if this can be added to the tag dictionary, false if there's a syntax error

◆ Matches()

PRAGMA_DISABLE_DEPRECATION_WARNINGS FORCEINLINE_DEBUGGABLE bool FGameplayTag::Matches ( TEnumAsByte< EGameplayTagMatchType::Type >  MatchTypeOne,
const FGameplayTag &  Other,
TEnumAsByte< EGameplayTagMatchType::Type >  MatchTypeTwo 
) const
inline

Check to see if two FGameplayTags match with explicit match types

参数
MatchTypeOneHow we compare this tag, Explicitly or a match with any parents as well
OtherThe second tag to compare against
MatchTypeTwoHow we compare Other tag, Explicitly or a match with any parents as well
返回
True if there is a match according to the specified match types; false if not

◆ MatchesAny()

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

返回
True if this tag matches ANY of the tags of in ContainerToCheck

◆ MatchesAnyExact()

FORCEINLINE bool FGameplayTag::MatchesAnyExact ( const FGameplayTagContainer &  ContainerToCheck) const

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

返回
True if this tag matches ANY of the tags of in ContainerToCheck exactly

◆ MatchesTag()

bool FGameplayTag::MatchesTag ( const FGameplayTag &  TagToCheck) const

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

返回
True if this tag matches TagToCheck

◆ MatchesTagDepth()

int32 FGameplayTag::MatchesTagDepth ( const FGameplayTag &  TagToCheck) const

Check to see how closely two FGameplayTags match.

Higher values indicate more matching terms in the tags.

参数
TagToCheckTag to match against
返回
The depth of the match, higher means they are closer to an exact match

◆ MatchesTagExact()

FORCEINLINE bool FGameplayTag::MatchesTagExact ( const FGameplayTag &  TagToCheck) const
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

返回
True if TagToCheck is Valid and is exactly this tag

◆ PostSerialize()

void FGameplayTag::PostSerialize ( const FArchive &  Ar)

Handles fixup and errors.

This is only called when not serializing a full FGameplayTagContainer

◆ RequestGameplayTag()

static FGameplayTag FGameplayTag::RequestGameplayTag ( const FName &  TagName,
bool  ErrorIfNotFound = true 
)
static

Gets the FGameplayTag that corresponds to the TagName

参数
TagNameThe Name of the tag to search for
ErrorIfNotfoundensure() that tag exists.
返回
Will return the corresponding FGameplayTag or an empty one if not found.

该结构体的文档由以下文件生成: