Using Gameplay Tags in C++?

This is a little outdated but I wanted to post an update for the way ive managed to get this working as of 4.19.1

Just a little helper function I made for the class.



bool AYourActor::CompareTags(FGameplayTagContainer const & EffectTags, FName const & Tag)
{
    FGameplayTag TagRequest = FGameplayTag::RequestGameplayTag(Tag);
    return EffectTags.HasTag(TagRequest);
}


This will error if it doesnt find the tag, and is about as simple as you can get.

2 Likes