So, I was learning how to use GAS and the course I was using to learn used this method to add a tag to a gameplay effect that would be added to the actor it would be applied to:
However, I noticed the tags isn’t being added and this line of code is deprecated:
After that I remembered that now we need to add components to add the tags on them, and so, I wrote this:
UTargetTagsGameplayEffectComponent& Component = Effect->AddComponent<UTargetTagsGameplayEffectComponent>();
FInheritedTagContainer TagContainer = FInheritedTagContainer();
TagContainer.AddTag(AuraTags.DamageTypesToDebuffs[DamageType]);
Component.SetAndApplyTargetTagChanges(TagContainer);
It does create the component, but the tag itself isn’t being added to it:
It was supposed to be adding a tag “Debuff.Burn” to the added/combined tags. Am I doing it wrong?