Gameplay Debugger Setup
Create an editor only module
In rider, you can easily add a new editor module like so; otherwise refer to the UE Documentation


Add gameplay debugger dependencies to your Build.cs file
Specifically: GameplayDebugger
and the GameplayDebuggerExtension's dependency: GameplayDebuggerExtension
public class EditorExtensionsGameEditor : ModuleRules
{
public EditorExtensionsGameEditor(ReadOnlyTargetRules Target) : base(Target) {
PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
}
);
PrivateDependencyModuleNames.AddRange(
new string[]
{
"CoreUObject",
"Engine",
"Slate",
"InputCore",
"SlateCore",
"GameplayDebugger",
"GameplayDebuggerExtension",
}
);
}
}
"GameplayDebugger",
"GameplayDebuggerExtension",
Setup your editor module:
EditorExtensionsGameEditorModule.h
#pragma once
#include "CoreMinimal.h"
#include "Modules/ModuleManager.h"
class FEditorExtensionsGameEditorModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
};
EditorExtensionsGameEditorModule.cpp
#include "EditorExtensionsGameEditor.h"
#if WITH_GAMEPLAY_DEBUGGER
#include "GameplayDebugger.h"
#endif
#define LOCTEXT_NAMESPACE "FEditorExtensionsGameEditorModule"
void FEditorExtensionsGameEditorModule::StartupModule() {
#if WITH_GAMEPLAY_DEBUGGER
IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
[[[// Continue with the overview to setup the plugin)|overview.html]]]
GameplayDebuggerModule.NotifyCategoriesChanged();
#endif
}
void FEditorExtensionsGameEditorModule::ShutdownModule() {
#if WITH_GAMEPLAY_DEBUGGER
if (IGameplayDebugger::IsAvailable()) {
IGameplayDebugger& GameplayDebuggerModule = IGameplayDebugger::Get();
GameplayDebuggerModule.NotifyCategoriesChanged();
}
#endif
}
#undef LOCTEXT_NAMESPACE
IMPLEMENT_MODULE(FEditorExtensionsGameEditorModule, EditorExtensionsGameEditor)
Last modified: 11 November 2024