中EN

Gameplay Tags

  • User-defined strings functioning as conceptual, hierarchical labels, like booleans or flags. Examples: Character.Enemy.Zombie, Movement.Mode.Swimming, GameplayEvent.RequestReset. Any number of levels separated by ..
  • Must be added to the tag dictionary: Project Settings (ini: Config/DefaultGameplayTags.ini, Config/Tags), Data Table (GameplayTagTableRow; editable while editor running; csv/json), C++ (NativeGameplayTags.h: UE_DECLARE_GAMEPLAY_TAG_EXTERN, UE_DEFINE_GAMEPLAY_TAG, UE_DEFINE_GAMEPLAY_TAG_COMMENT, UE_DEFINE_GAMEPLAY_TAG_STATIC). Add GameplayTags module to Build.cs. Editing .ini by text editor requires editor restart. Lyra: LyraGameplayTags.h/.cpp.
  • FGameplayTagContainer: AddTag, RemoveTag, AppendTags; HasTag, HasAny, HasAll. Empty container input returns false except All functions.
  • FGameplayTagQuery: Any/All/No Tags Match; Any/All/No Expressions Match (empty returns true for All/No).
  • Restricted tags via Advanced Gameplay Tags; cannot be deleted in editor.
  • IGameplayTagAssetInterface / GetOwnedGameplayTags: get tags without casting (ALyraTaggedActor).

引用这一章的笔记

输入关键词开始搜索

滚轮或双指缩放 · 拖动平移 · 双击放大 / 还原