[Summary]
In UE 5.7 and later, if a tag is added once to an FGameplayTagCountContainer, the container is reset, and the same tag is added once more, GetExplicitTagCount() returns 2 instead of the expected value of 1.
Reset() clears only the hierarchical GameplayTagCountMap. It does not clear Items, which stores explicit tag counts, or ExplicitTags. Consequently, explicit state from before the reset survives and is accumulated by subsequent updates.
The TagCountReset sample project linked below calls the reproduction function automatically from the default Character's BeginPlay (). The issue can therefore be reproduced by opening the project and starting PIE.
[Description]
In UE 5.6.1, FGameplayTagCountContainer:: Reset() clears all three state containers:
1 GameplayTagCountMap. Reset();
2 ExplicitTagCountMap.Reset();
3 ExplicitTags.Reset();
In UE 5.7, explicit count storage was changed from TMap<FGameplayTag, int32> ExplicitTagCountMap to TArray<FGameplayTagCountItem> Items. The updated Reset() implementation, however, clears only GameplayTagCountMap.
GetExplicitTagCount() and UpdateExplicitTags() read and update Items, while GetExplicitGameplayTags() returns the separate ExplicitTags container. Because neither is cleared by Reset(), the old explicit count and tag remain. A subsequent +1 update increments the stale count from 1 to 2.
At the same time, GameplayTagCountMap starts again from zero, leaving the hierarchical and explicit counts inconsistent within the same container.
[Results]
UE 5.8.1 prints:
1 Tag Count: 1
2 Tag Count: 2
Immediately after the first update and Reset(), the observable state is inconsistent:
GetTagCount(Tag): 0
GetExplicitTagCount (Tag): 1
GetExplicitGameplay Tags(). HasTagExact(Tag): true
[Expected]
After Reset(), the hierarchical count, explicit count, and explicit tag list should all be empty.
Adding the same tag once more should make the second GetExplicitTagCount() return 1.
1 Tag Count: 1
2 Tag Count: 1
[Suggested Fix]
Clear Items and ExplicitTags together with GameplayTagCountMap, preserving the complete-reset behavior from UE 5.6.
[Image Removed]
[Steps to Reproduce]
1. Download and extract the TagCountReset sample project from the Sample Project link below.
2. Open TagCountReset.uproject with UE 5.8.1.
3. After the project opens, start PIE without providing input or editing any assets.
4. The following TestTagCount() function runs automatically from the default Character's BeginPlay().
[Image Removed]
5. Inspect the Output Log.
[Additional Steps]
1. Open TagCountReset.uproject with UE 5.8.1.
2. After the project opens, start PIE without providing input or editing any assets.
3. TestTagCount() runs automatically from the default Character's BeginPlay().
4. Verify that the Output Log prints Tag Count: 1 followed by Tag Count: 2.
5. Confirm that the second value is produced after Reset() and only one additional update of the same tag.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-389901 in the post.
| 0 |
| Component | UE - Gameplay - Gameplay Tags |
|---|---|
| Affects Versions | 5.7.4, 5.8.1 |
| Created | Aug 4, 2026 |
|---|---|
| Updated | Aug 4, 2026 |