As the title suggests it’s not possible for me set an FGameplayTag
as a UProperty
, in my case it’s a struct member.
Tried also have a UFUNCTION(BlueprintCallable)
with a parameter of type FGameplayTag
which works neither.
Example code:
USTRUCT(BlueprintType)
struct FStatData
{
GENERATED_BODY()
UPROPERTY(EditDefaultsOnly)
FGameplayTag StatTag;
};
On compilation I get an error (sry for the german snippets in there but mainly english):
Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) class UScriptStruct * __cdecl Z_Construct_UScriptStruct_FGameplayTag(void)" (__imp_?Z_Construct_UScriptStruct_FGameplayTag@@YAPEAVUScriptStruct@@XZ)" in Funktion ""void __cdecl `dynamic initializer for 'public: static struct UECodeGen_Private::FStructPropertyParams const Z_Construct_UScriptStruct_FStatData_Statics::NewProp_StatTag''(void)" (??__E?NewProp_StatTag@Z_Construct_UScriptStruct_FStatData_Statics@@2UFStructPropertyParams@UECodeGen_Private@@B@@YAXXZ)".
UnrealEditor-MyProject.dll: [LNK1120] 1 nicht aufgelöste Externe
If the UPROPERTY
is removed or the BlueprintCallable
is removed compiling works.
When I try to create a similar struct in Blueprints via Editor it works with adding a gampelaytag as property.
But in my case I need that in CPP.
Is not allowed to have BP callable FGameplayTags
defined in CPP or what is going on here?