Summary
UE 5.8: Blueprint Map Find fails for Gameplay Attribute keys that compare equal with the Gameplay Attribute == node.
The affected map is a local variable in a Blueprint Function Library, mapping Gameplay Attributes to Gameplay Effect classes. Diagnostics show that the matching map key has AttributeOwner=None, while the lookup attribute has AttributeOwner=PlayerAttributeSet. Their attribute names, property pointers, and hashes match.
What Type of Bug are you experiencing?
Framework
Steps to Reproduce
These steps describe the issue in my existing project; reproduction in a clean project has not yet been verified.
- Define XP_Technical in a C++ PlayerAttributeSet.
- In a Blueprint Function Library function, create a local Map variable with Gameplay Attribute keys and Gameplay Effect Class values.
- Populate the map defaults with PlayerAttributeSet.XP_Technical and its Gameplay Effect class.
- During play, use Map Find to look up PlayerAttributeSet.XP_Technical. Found returns false.
- Retrieve the map’s Keys and compare the matching key with the lookup attribute using Equal (Gameplay Attribute). This returns true.
Expected Result
Map Find returns true and the associated Gameplay Effect class for the matching Gameplay Attribute. The same as the == does.
Observed Result
Map Find returns false, although Gameplay Attribute == returns true.
Diagnostic comparison of the matching map key (A) and lookup attribute (B):
Native ==: true
Reflected struct comparison (Map Identical): false
Property pointers: identical
Native and map hashes: identical
AttributeName: XP_Technical for both
Attribute: PlayerAttributeSet:XP_Technical for both
AttributeOwner A: None
AttributeOwner B: PlayerAttributeSet
UE’s Gameplay Attribute == compares the attribute property, while Blueprint Map Find uses reflected struct comparison, which also checks AttributeOwner.
Restarting Unreal and clearing/repopulating the map did not resolve the issue. The cause of the missing cached owner has not been determined.
Affects Versions
5.8
Platform(s)
Windows