Cannot compile with FGameplayTag

SOLUTION- Have to add “GameplayTags” in the Build.cs file

Original:
Live coding spits an error if I use an FGameplayTag within the TMap below. If I replace the FGameplayTag with an FString, it compiles fine.

I’ve included the GameplayTagContainer.h. The error doesn’t mean anything to me, other than that there is some issue constructing the Gameplay tag struct?

#include "GameplayTagContainer.h"
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "Alaska_GameMode.generated.h"



/** Please add a struct description */
USTRUCT(BlueprintType)
struct FActionQueues
{
	GENERATED_BODY()
public:
	/** Please add a variable description */
	UPROPERTY(BlueprintReadWrite, EditAnywhere)
	TMap<FGameplayTag,double> ActionMappedProgress;
};

Error:

Display      LogLiveCoding             Starting Live Coding compile.
Display      LogLiveCoding                Creating library C:\Users\javor\Desktop\R2NAlaska\Binaries\Win64\UnrealEditor-R2NAlaska.patch_2.lib and object C:\Users\javor\Desktop\R2NAlaska\Binaries\Win64\UnrealEditor-R2NAlaska.patch_2.exp
Display      LogLiveCoding             Alaska_GameMode.gen.cpp.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) class UScriptStruct * __cdecl Z_Construct_UScriptStruct_FGameplayTag(void)" (__imp_?Z_Construct_UScriptStruct_FGameplayTag@@YAPEAVUScriptStruct@@XZ) referenced in function "void __cdecl `dynamic initializer for 'public: static struct UECodeGen_Private::FStructPropertyParams const Z_Construct_UScriptStruct_FActionQueues_Statics::NewProp_ActionMappedProgress_Key_KeyProp''(void)" (??__E?NewProp_ActionMappedProgress_Key_KeyProp@Z_Construct_UScriptStruct_FActionQueues_Statics@@2UFStructPropertyParams@UECodeGen_Private@@B@@YAXXZ)
Display      LogLiveCoding             C:\Users\javor\Desktop\R2NAlaska\Binaries\Win64\UnrealEditor-R2NAlaska.patch_2.exe : fatal error LNK1120: 1 unresolved externals
Display      None                      Reload/Re-instancing Complete: No object changes detected
Error        LogLiveCoding             Live coding failed, please see Live console for more information

you need to add GameplayTags module to your project

1 Like