Trying to use FGameplayTagContainer and failing to build

Pretty simple, but I can’t make an object of type FGameplayTagContainer in my header file. Here’s what I’m trying:


#include "GameplayTagContainer.h"

later in the same file:

FGameplayTagContainer GameplayTags;


error LNK2019: unresolved external symbol “__declspec(dllimport) public: __cdecl FGameplayTagContainer::FGameplayTagContainer(void)” (_imp??0FGameplayTagContainer@@QEAA@XZ) referenced in function “public: __cdecl ACombatEffect::ACombatEffect(void)” (??0ACombatEffect@@QEAA@XZ)

What am I missing? I’ve checked several UE4 engine files, and they use the same include statement as me and variables defined in the same way.



You are missing GameplayTags module in your PublicDependencyModuleNames within ProjectName.Build.cs.

You’re welcome :]

You are a lifesaver. I wish this had been put in the documentation!

Definitely a lifesaver. This one had me stumped until I did a quick google and found this in less than 10 seconds.