Is there a way to iterate through a Gameplay Tag Container ?

I’m trying to convert a gameplay tag container to an array of gameplay tags so I can iterate through them one by one and do something, is that not possible ? I know I can check if a tag exists within the container but I want to know what tag specifically and pass it to another function.

Thank you.

There’s a function in FGameplayTagContainer to get an arrays of tags : GetGameplayTagArray()

FGameplayTagContainer TagContainer;
TArray<FGameplayTag> Tags;
TagContainer.GetGameplayTagArray(Tags);
for(FGameplayTag Tag : Tags)
{
	
}
2 Likes

Thank you, I also found out in BP you can break it.
image

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.