UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
GameplayDebuggerLocalController.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "UObject/Object.h"
9#include "GameplayDebuggerLocalController.generated.h"
10
11class AActor;
16class UInputComponent;
17struct FKey;
18class UFont;
19
20UCLASS(NotBlueprintable, NotBlueprintType, noteditinlinenew, hidedropdown, Transient)
22{
24
25 virtual void BeginDestroy() override;
26
29
31 void Cleanup();
32
33#if WITH_GAMEPLAY_DEBUGGER_MENU
36
38 void OnDebugDraw(class UCanvas* Canvas, class APlayerController* PC);
39
41 void BindInput(UInputComponent& InputComponent);
42
44 bool GAMEPLAYDEBUGGER_API IsKeyBound(const FName KeyName) const;
45
46 static void SetConsoleCommandsEnabled(const bool bEnabled) { bConsoleCommandsEnabled = bEnabled; }
47#endif // WITH_GAMEPLAY_DEBUGGER_MENU
48protected:
49 UPROPERTY()
51
52 UPROPERTY()
54
55 UPROPERTY()
56 TObjectPtr<AActor> DebugActorCandidate;
57
58 UPROPERTY()
59 TObjectPtr<UFont> HUDFont;
60
61 TArray<TArray<int32> > DataPackMap;
62 TArray<TArray<int32> > SlotCategoryIds;
63 TArray<FString> SlotNames;
64
65 uint32 bSimulateMode : 1;
66 uint32 bNeedsCleanup : 1;
67 uint32 bIsSelectingActor : 1;
68 uint32 bIsLocallyEnabled : 1;
69 uint32 bPrevLocallyEnabled : 1;
70 uint32 bEnableTextShadow : 1;
71 uint32 bPrevScreenMessagesEnabled : 1;
72#if WITH_EDITOR
74#endif // WITH_EDITOR
77
79
80#if WITH_GAMEPLAY_DEBUGGER_MENU
82
84
85 FString ActivationKeyDesc;
86 FString RowUpKeyDesc;
87 FString RowDownKeyDesc;
88 FString CategoryKeysDesc;
89
91 static constexpr int32 NumCategoriesPerRow = 10;
92
93 float PaddingLeft;
94 float PaddingRight;
95 float PaddingTop;
96 float PaddingBottom;
97
100
101 bool bDebugDrawEnabled = true;
102
103 void OnActivationPressed();
107 void OnCategory0Pressed();
108 void OnCategory1Pressed();
109 void OnCategory2Pressed();
110 void OnCategory3Pressed();
111 void OnCategory4Pressed();
112 void OnCategory5Pressed();
113 void OnCategory6Pressed();
114 void OnCategory7Pressed();
115 void OnCategory8Pressed();
116 void OnCategory9Pressed();
120 void OnExtensionBindingEvent(int32 ExtensionId, int32 HandlerId);
121
122 enum class ESelectionMode : uint8
123 {
125 LocalPlayer
126 };
127
130
132 void OnSelectLocalPlayer();
133
136
138 void OnSelectActorTick();
139
140 void OnStartSelecting(ESelectionMode SelectionMode);
141
143 void ToggleSlotState(int32 SlotIdx);
144
146 void ToggleActivation(ESelectionMode SelectionMode = ESelectionMode::BestPawnCandidate);
147
150
153
154#if WITH_EDITOR
156 void OnSelectionChanged(UObject* Object);
158 void OnBeginPIE(const bool bIsSimulating);
159 void OnEndPIE(const bool bIsSimulating);
160#endif // WITH_EDITOR
161
162 FString GetKeyDescriptionShort(const FKey& KeyBind) const;
163 FString GetKeyDescriptionLong(const FKey& KeyBind) const;
164
166 void RebuildDataPackMap();
167#endif // WITH_GAMEPLAY_DEBUGGER_MENU
168
170 void OnCategoriesChanged();
171
173 void RestoreCategories();
174};
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Actor.h:257
Definition GameplayDebuggerCategoryReplicator.h:119
Definition GameplayDebuggerPlayerManager.h:34
Definition PlayerController.h:261
Definition GameplayDebuggerTypes.h:30
Definition GameplayDebuggerCategory.h:49
Definition NameTypes.h:617
Definition Array.h:670
Definition SharedPointer.h:153
Definition Canvas.h:159
Definition Font.h:111
virtual void BeginDestroy() override
Definition Font.cpp:30
Definition GameplayDebuggerLocalController.h:22
int32 NumCategories
Definition GameplayDebuggerLocalController.h:76
int32 NumCategorySlots
Definition GameplayDebuggerLocalController.h:75
static bool bConsoleCommandsEnabled
Definition GameplayDebuggerLocalController.h:78
Definition InputComponent.h:729
Definition Object.h:95
Definition ITypedTableView.h:14
Definition InputCoreTypes.h:50
Definition TimerHandle.h:12
Definition ObjectPtr.h:488