# Gameplay Debugger - Create Templated Category

**URL:** <https://forums.unrealengine.com/t/gameplay-debugger-create-templated-category/442075>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [January 25, 2019, 4:23pm UTC](https://forums.unrealengine.com/t/gameplay-debugger-create-templated-category/442075 "2019-01-25T16:23:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Albatros155](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Albatros155](https://forums.unrealengine.com/u/Albatros155)\
**Post date:** [January 25, 2019, 4:23pm UTC](https://forums.unrealengine.com/t/gameplay-debugger-create-templated-category/442075/1 "2019-01-25T16:23:11Z")

</div>

Hello everyone,

I’m trying to make a generic templated category for the gameplay debugger. I’m currently following this tutorial:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

But I’m currently having compile error with it which is:

```
error LNK2019: unresolved external symbol "__declspec(dllimport) public:__cdecl FGameplayDebuggerCategory::FGameplayDebuggerCategory(void)" (__imp_??0FGameplayDebuggerCategory@@QEAA@XZ) referenced in function "public: static class TSharedRef<class FGameplayDebuggerCategory,0>__cdecl FGameplayDebuggerCategoryT<class USoldierStateComponent>::MakeInstance(void)" (?MakeInstance@?$FGameplayDebuggerCategoryT@VUSoldierStateComponent@@@@SA?AV?$TSharedRef@VFGameplayDebuggerCategory@@$0A@@@XZ)
2>dbsbuild : error : aborting build on error (1120)

```

But I don’t really understood what’s happening here. I put every function def in the .h file to make sure to avoid unresolved symbol but I still get this one no matter what.

The specialized version of the template is declared here:

```
UMyGameInstance::UMyGameInstance(const FObjectInitializer& ObjectInitializer)
    : Super(ObjectInitializer)
{
    FGameplayDebuggerCategoryT<USoldierStateComponent>::Register(TEXT("Soldier State"), 6);
}

```

And it seems the problems is coming from either this line in Register function:

```
auto creationDelegate = IGameplayDebugger::FOnGetCategory::CreateStatic(&FGameplayDebuggerCategoryT<T>::MakeInstance);

```

or this:

```
template<typename T>
inline TSharedRef<FGameplayDebuggerCategory> FGameplayDebuggerCategoryT<T>::MakeInstance()
{
    return MakeShareable(new FGameplayDebuggerCategoryT<T>());
}

```

But I’m not sure to understand why. Does anyone tryied to reuse to implementation from this tutorial?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![SavvyIndoorsman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SavvyIndoorsman](https://forums.unrealengine.com/u/SavvyIndoorsman)\
**Post date:** [January 25, 2019, 7:09pm UTC](https://forums.unrealengine.com/t/gameplay-debugger-create-templated-category/442075/2 "2019-01-25T19:09:15Z")

</div>

The FGameplayDebuggerCategory struct belongs to the “GameplayDebugger” module. For your project to be able to use it, you’ll need to add “GameplayDebugger” to the modules array in your project’s Build.cs file.

---

<div class="post-metadata">

**Author:** ![Albatros155](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Albatros155](https://forums.unrealengine.com/u/Albatros155)\
**Post date:** [January 28, 2019, 9:15am UTC](https://forums.unrealengine.com/t/gameplay-debugger-create-templated-category/442075/3 "2019-01-28T09:15:36Z")

</div>

God I hate myself and thank you so much, didn’t knew it was on a separate module…
