UEC++ From Basics to Advanced | M11-003: GameplayTag C++ Usage

This hands-on coding video demonstrates using GameplayTags in C++. We declare native tag types using the three available macros: DECLARE_GET_OWNED_GAMEPLAY_TAGS (single file), DECLARE_GET_OWNED_GAMEPLAY_TAGS_EXTERN (header declaration with CPP implementation), and DECLARE_GET_OWNED_GAMEPLAY_TAGS_STATIC (file-local scope). The pattern mirrors log category declaration from the previous module. We create a GameplayTags.h header and implement the tags, then expose a FGameplayTagContainer UPROPERTY in an Actor class with BlueprintReadWrite and EditAnywhere for editor visibility. In BeginPlay, we add tags using UGameplayTagManager::RequestGameplayTag and the container's AddTag method, verifying the results at runtime with UE_LOG. We also override the GetOwnedGameplayTags interface function to aggregate tags from multiple containers, and demonstrate how the parent-child query methods (HasTag, HasAny, HasAll) work identically in both C++ and Blueprint.