Navigation
API > API/Runtime > API/Runtime/GameplayDebugger
GAMEPLAY DEBUGGER
This tool allows easy on screen debugging of gameplay data, supporting client-server replication. Data is organized into named categories, which can be toggled during debugging.
To enable it, press Apostrophe key (UGameplayDebuggerConfig::ActivationKey)
Category class:
- derives from FGameplayDebuggerCategory
- implements at least CollectData() and DrawData() functions
- If WITH_GAMEPLAY_DEBUGGER is defined (doesn't exist in shipping builds by default; see note below to override), it will include all default debug categories and menu
- If WITH_GAMEPLAY_DEBUGGER_CORE is defined (see note below), it will compile the core parts of the tool, waiting for user to register a debug category and create a replicator when desired.
- needs to be registered and unregistered manually by owning module
- automatically replicate data added with FGameplayDebuggerCategory::AddTextLine, FGameplayDebuggerCategory::AddShape
- automatically replicate data structs initialized with FGameplayDebuggerCategory::SetDataPackReplication
- can define own input bindings (e.g. subcategories, etc)
Extension class:
- derives from FGameplayDebuggerExtension
- needs to be registered and unregistered manually by owning module
- can define own input bindings
- basically it's a stateless, not replicated, not drawn category, ideal for making e.g. different actor selection mechanic
Check FGameplayDebuggerCategory_BehaviorTree for implementation example. Check AIModule/Private/AIModule.cpp for registration example.
Note. Use 'SetupGameplayDebuggerSupport(Target)' when adding module to your project's Build.cs (see AIModule/AIModule.Build.cs) Note. Use 'bUseGameplayDebugger={0|1}' in your
| Name | EGameplayDebuggerCategoryState |
| Type | enum |
| Header File | /Engine/Source/Runtime/GameplayDebugger/Public/GameplayDebugger.h |
| Include Path | #include "GameplayDebugger.h" |
Syntax
enum EGameplayDebuggerCategoryState
{
EnabledInGameAndSimulate,
EnabledInGame,
EnabledInSimulate,
Disabled,
Hidden,
}
Values
| Name | Remarks |
|---|---|
| EnabledInGameAndSimulate | |
| EnabledInGame | |
| EnabledInSimulate | |
| Disabled | |
| Hidden |