Select debug actor for gameplay debugger

Hi. I am trying to debug specific character with the gameplay debugger (the character was selected from C++). I am trying to compile code but there are unresolved external symbols.

AGameplayDebuggerPlayerManager& PlayerManager = AGameplayDebuggerPlayerManager::GetCurrent(GetWorld());
auto Replicator = PlayerManager.GetReplicator(*GetPlayerController());

if (Replicator != nullptr)
	Replicator->SetDebugActor(Character);

2>Module.MyProject.3_of_5.cpp.obj : error LNK2019: unresolved external symbol "public: class AGameplayDebuggerCategoryReplicator * __cdecl AGameplayDebuggerPlayerManager::GetReplicator(class APlayerController const &)const " (?GetReplicator@AGameplayDebuggerPlayerManager@@QEBAPEAVAGameplayDebuggerCategoryReplicator@@AEBVAPlayerController@@@Z) referenced in function …
2>Module.MyProject.3_of_5.cpp.obj : error LNK2019: unresolved external symbol “public: static class AGameplayDebuggerPlayerManager & __cdecl AGameplayDebuggerPlayerManager::GetCurrent(class UWorld *)” (?GetCurrent@AGameplayDebuggerPlayerManager@@SAAEAV1@PEAVUWorld@@@Z) referenced in function …

I added “GameplayDebugger” module name to PublicDependencyModuleNames but unsuccessfully.

In previous versions of the engine was quite a line:

AGameplayDebuggingReplicator::OnSelectionChangedDelegate.Broadcast(Character);

Looking at the code I’ve noticed AGameplayDebuggerPlayerManager is not exported as part of gameplay debugger API. You can do it yourself, just change it’s definition to say:

class GAMEPLAYDEBUGGER_API AGameplayDebuggerPlayerManager : public AActor

This will require gameplay debugger’s compilation, but should make it work :slight_smile:

Cheers,

–mieszko

Thanks for the answer, Mieszko. Is it possible to bring this functionality to the engine’s code in the following minor versions?