Problem adding/removing gameplay tags using interfaces

I’m testing out using gameplay tags to decouple blueprints.

I have a BPI_GameplayTags interface with the GetGameplayTags interface function that allows me to get the gameplay tags for any actor that implements the interface

I have a level blueprint with a trigger box and when i walk into it, I would expect it to add the tag FollowActor

However it doesn’t do this. It doesn’t remove tags either.

Is it because the TagContainer input pin gets the TagContainer “by ref”?

If so, what is the correct way to use this?

As a work around, I have added AddGameplayTags and RemoveGameplayTags to my BPI_GameplayTags interface but it seems like a weird duplication of effort and it would have been nice to just have to use my GetGameplayTags interface function and the UE5 AddGameplayTag function.

Your interface function returns a copy of the variable.
Pretty sure it’s not possible to return a reference to a variable in blueprints.
So you’ll have to use the Add/Remove functions instead.

1 Like