Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Gameplay Debugger - Create Templated Category

Hello everyone,

I'm trying to make a generic templated category for the gameplay debugger. I'm currently following this tutorial: https://wiki.unrealengine.com/Gameplay_Debugger:_Quick,_simple,_re-usable

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

Product Version: UE 4.19
more ▼

asked Jan 25 '19 at 04:23 PM in C++ Programming

avatar image

3 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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.

more ▼

answered Jan 25 '19 at 07:09 PM

avatar image

1.2k 4 5 8

avatar image Albatros155 Jan 28 '19 at 09:15 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question