We have some native gameplay tags defined in our header and cpp files. All of them work fine except for a strange one. We define it the same as others, in the header file we add
UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_Badge_PlayerJourney_Feature);
and in the CPP file, we add
UE_DEFINE_GAMEPLAY_TAG(TAG_Badge_PlayerJourney_Feature, "Badge.PlayerJourney.Feature");
That tag always turned into an invalid tag and doesn’t work in our game build (it still works in the editor though). After adding some debug logs to the engine source, we found that somehow it’s turned into a very strange string neBytePropertyIntPropertyᅪ4BoolPropertyvFloatPropertyᅪᄇObjectPropertyNameProperty,DelegatePropertyネDoublePropertynArrayPropertyᅪᄁStructPropertyヨVectorPropertyᅫRotatorPropertyᅪ¬StrPropertyᅪTextPropertyNInterfacePropertyᅪ@MulticastDelegatePropertyᅪᄚLazyObjectPropertyトSoftObjectPropertylInt64PropertyᅪVInt32PropertyᅪHInt16Propertyᅪ*Int8PropertyネUInt64PropertyᄄUInt32PropertyᅠUInt16PropertyMapPropertyᅪᅵSetPropertyᅪ&_1
???. Here are the places that we added the debug log:
and here is the log it printed (I also added FDebug::DumpStacktraceToLog to see the call stack):
The bug happens in Unreal Engine 5.5.3. Previously, in Unreal Engine 5.0.3, this bug doesn’t happen.