Navigation
API > API/Runtime > API/Runtime/Engine
Cheat Manager is a central blueprint to implement test and debug code and actions that are not to ship with the game. As the Cheat Manager is not instanced in shipping builds, it is for debugging purposes only
| Name | UCheatManager |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/CheatManager.h |
| Include Path | #include "GameFramework/CheatManager.h" |
Syntax
UCLASS (Blueprintable, Within=PlayerController, MinimalAPI)
class UCheatManager : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UCheatManager
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UCheatManager
(
const FObjectInitializer& ObjectInitializer |
GameFramework/CheatManager.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| bDebugCapsuleSweepPawn | bool | If we should should perform a debug capsule trace for pawns and draw results. | GameFramework/CheatManager.h |
| OnCheatManagerCreatedDelegate | FOnCheatManagerCreated | Delegate called when the asset manager singleton is created | GameFramework/CheatManager.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bDebugCapsuleSweep | uint32 | Trace/Sweep debug start. | GameFramework/CheatManager.h | |
| bDebugCapsuleTraceComplex | uint32 | If we should trace complex collision in debug capsule sweeps. Set with DebugCapsuleSweepComplex() | GameFramework/CheatManager.h | |
| bToggleAILogging | uint32 | Holds information if we used ToggleAILogging cheat to activate AI logging | GameFramework/CheatManager.h | |
| CurrentTraceIndex | int32 | Index of the array for current trace to overwrite. | GameFramework/CheatManager.h | |
| CurrentTracePawnIndex | int32 | Index of the array for current trace to overwrite. | GameFramework/CheatManager.h | |
| DebugCameraControllerClass | TSubclassOf< class ADebugCameraController > | Debug camera - used to have independent camera without stopping gameplay | GameFramework/CheatManager.h |
|
| DebugCameraControllerRef | TObjectPtr< class ADebugCameraController > | Debug camera - used to have independent camera without stopping gameplay | GameFramework/CheatManager.h | |
| DebugCapsuleHalfHeight | float | Half distance between debug capsule sphere ends. | GameFramework/CheatManager.h | |
| DebugCapsuleRadius | float | Radius of debug capsule | GameFramework/CheatManager.h | |
| DebugTraceChannel | TEnumAsByte< enum ECollisionChannel > | What channel are we tracing | GameFramework/CheatManager.h | |
| DebugTraceDistance | float | How far debug trace should go out from player viewpoint | GameFramework/CheatManager.h | |
| DebugTraceDrawNormalLength | float | How long to draw the normal result | GameFramework/CheatManager.h | |
| DebugTraceInfoList | TArray< struct FDebugTraceInfo > | Array of information for capturing | GameFramework/CheatManager.h | |
| DebugTracePawnInfoList | TArray< struct FDebugTraceInfo > | Array of information for capturing | GameFramework/CheatManager.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCapsuleSweepDebugInfo
(
const FVector& LineTraceStart, |
Add Debug Trace info into current index - used when DebugCapsuleSweepPawn is on | GameFramework/CheatManager.h | |
void AddCheatManagerExtension
(
UCheatManagerExtension* CheatObject |
Registers a cheat manager extension with this cheat manager | GameFramework/CheatManager.h | |
| This function is used to print out the BugIt location. | GameFramework/CheatManager.h |
|
|
virtual void BugItGo
(
float X, |
This will move the player and set their rotation to the passed in values. | GameFramework/CheatManager.h |
|
virtual void BugItGoString
(
const FString& TheLocation, |
This will move the player and set their rotation to the passed in values. | GameFramework/CheatManager.h | |
virtual void BugItStringCreator
(
FVector ViewLocation, |
This will create a BugItGo string for us. | GameFramework/CheatManager.h |
|
virtual void BugItWorker
(
FVector TheLocation, |
This will move the player and set their rotation to the passed in values. | GameFramework/CheatManager.h | |
virtual void ChangeSize
(
float F |
Scale the player's size to be F * default size. | GameFramework/CheatManager.h |
|
void CheatScript
(
FString ScriptName |
Executes commands listed in CheatScript.ScriptName ini section of DefaultGame.ini | GameFramework/CheatManager.h |
|
virtual void DamageTarget
(
float DamageAmount |
Damage the actor you're looking at (sourced from the player). | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweep () |
Toggle capsule trace debugging. | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweepCapture() |
Capture current trace and add to persistent list | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweepChannel
(
enum ECollisionChannel Channel |
Change Trace Channel | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweepClear() |
Clear persistent list for trace capture | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweepComplex
(
bool bTraceComplex |
Change Trace Complex setting | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweepPawn() |
Capture current local PC's pawn's location and add to persistent list | GameFramework/CheatManager.h |
|
virtual void DebugCapsuleSweepSize
(
float HalfHeight, |
Change Trace capsule size | GameFramework/CheatManager.h |
|
virtual void DestroyAll
(
TSubclassOf< class AActor > aClass |
Destroy all actors of class aClass | GameFramework/CheatManager.h |
|
virtual void DestroyAllPawnsExceptTarget () |
Destroy all pawns except for the (pawn) target. | GameFramework/CheatManager.h |
|
virtual void DestroyPawns
(
TSubclassOf< class APawn > aClass |
Destroys (by calling destroy directly) all non-player pawns of class aClass in the level | GameFramework/CheatManager.h |
|
void DestroyServerStatReplicator() |
GameFramework/CheatManager.h |
|
|
virtual void DestroyTarget() |
Destroy the actor you're looking at. | GameFramework/CheatManager.h |
|
virtual bool DoGameSpecificBugItLog
(
FOutputDevice& OutputFile |
Do game specific bugIt | GameFramework/CheatManager.h | |
virtual void DumpChatState() |
Dump known chat information | GameFramework/CheatManager.h |
|
virtual void DumpOnlineSessionState() |
Dump online session information | GameFramework/CheatManager.h |
|
virtual void DumpPartyState() |
Dump known party information | GameFramework/CheatManager.h |
|
virtual void DumpVoiceMutingState() |
Dump current state of voice chat | GameFramework/CheatManager.h |
|
UCheatManagerExtension * FindCheatManagerExtension
(
const UClass* InClass |
Finds a previously registered cheat manager extension of the specified class | GameFramework/CheatManager.h | |
T * FindCheatManagerExtension () |
Finds a previously registered cheat manager extension of the specified class | GameFramework/CheatManager.h | |
| Finds a previously registered cheat manager extension that implements the specified interface | GameFramework/CheatManager.h | ||
UCheatManagerExtension * FindCheatManagerExtensionInterface
(
const UClass* InClass |
Finds a previously registered cheat manager extension that implements the specified interface | GameFramework/CheatManager.h | |
virtual void FlushLog() |
This will force a flush of the output log to file | GameFramework/CheatManager.h |
|
virtual void Fly() |
Pawn can fly. | GameFramework/CheatManager.h |
|
virtual void FreezeFrame
(
float Delay |
Pause the game for Delay seconds. | GameFramework/CheatManager.h |
|
APlayerController * GetPlayerController() |
GameFramework/CheatManager.h |
|
|
virtual UWorld * GetWorld() |
Use the Outer Player Controller to get a World. | GameFramework/CheatManager.h | |
virtual void Ghost() |
Pawn no longer collides with the world, and can fly | GameFramework/CheatManager.h |
|
virtual void God() |
Invulnerability cheat. | GameFramework/CheatManager.h |
|
virtual void InitCheatManager() |
Called when CheatManager is created to allow any needed initialization. | GameFramework/CheatManager.h | |
virtual void InvertMouse() |
Backwards compatibility exec function for people used to it instead of using InvertAxisKey | GameFramework/CheatManager.h |
|
virtual bool IsDebugCameraActive() |
Returns true if the player currently has a debug camera | GameFramework/CheatManager.h | |
virtual void LogLoc() |
Logs the current location in bugit format without taking screenshot and further routing. | GameFramework/CheatManager.h |
|
| Bug it log to file | GameFramework/CheatManager.h | ||
virtual void OnlyLoadLevel
(
FName PackageName |
Load the given level. | GameFramework/CheatManager.h |
|
void OnPlayerEndPlayed
(
AActor* Player, |
GameFramework/CheatManager.h | ||
virtual void PlayersOnly() |
Freeze everything in the level except for players. | GameFramework/CheatManager.h |
|
void ReceiveEndPlay() |
This is the End Play event for the CheatManager | GameFramework/CheatManager.h |
|
void ReceiveInitCheatManager() |
BP implementable event for when CheatManager is created to allow any needed initialization. | GameFramework/CheatManager.h |
|
void RemoveCheatManagerExtension
(
UCheatManagerExtension* CheatObject |
Removes a cheat manager extension from this cheat manager | GameFramework/CheatManager.h | |
virtual void ServerToggleAILogging() |
GameFramework/CheatManager.h |
|
|
virtual void SetLevelStreamingStatus
(
FName PackageName, |
Streaming level debugging | GameFramework/CheatManager.h | |
virtual void SetMouseSensitivityToDefault() |
Exec function to return the mouse sensitivity to its default value | GameFramework/CheatManager.h |
|
void SetWorldOrigin() |
Translate world origin to this player position | GameFramework/CheatManager.h |
|
virtual void Slomo
(
float NewTimeDilation |
Modify time dilation to change apparent speed of passage of time. | GameFramework/CheatManager.h |
|
void SpawnServerStatReplicator() |
GameFramework/CheatManager.h |
|
|
virtual void StreamLevelIn
(
FName PackageName |
Stream in the given level. | GameFramework/CheatManager.h |
|
virtual void StreamLevelOut
(
FName PackageName |
Stream out the given level. | GameFramework/CheatManager.h |
|
virtual void Summon
(
const FString& ClassName |
Load Classname and spawn an actor of that class | GameFramework/CheatManager.h |
|
virtual void Teleport() |
Teleport to surface player is looking at. | GameFramework/CheatManager.h |
|
virtual void TestCollisionDistance() |
Test all volumes in the world to the player controller's view location | GameFramework/CheatManager.h |
|
void TickCollisionDebug() |
Do any trace debugging that is currently enabled | GameFramework/CheatManager.h | |
virtual void ToggleAILogging() |
Toggles AI logging | GameFramework/CheatManager.h |
|
virtual void ToggleDebugCamera() |
Toggle between debug camera/player camera without locking gameplay and with locking local player controller input. | GameFramework/CheatManager.h |
|
void ToggleServerStatReplicatorClientOverwrite() |
GameFramework/CheatManager.h |
|
|
void ToggleServerStatReplicatorUpdateStatNet() |
GameFramework/CheatManager.h |
|
|
void UpdateSafeArea() |
GameFramework/CheatManager.h |
|
|
virtual void ViewActor
(
FName ActorName |
View from the point of view of AActor with Name ActorName. | GameFramework/CheatManager.h |
|
virtual void ViewClass
(
TSubclassOf< class AActor > DesiredClass |
View from the point of view of an AActor of class DesiredClass. | GameFramework/CheatManager.h |
|
virtual void ViewPlayer
(
const FString& S |
View from the point of view of player with PlayerName S. | GameFramework/CheatManager.h |
|
virtual void ViewSelf() |
Make controlled pawn the viewtarget again. | GameFramework/CheatManager.h |
|
virtual void Walk() |
Return to walking movement mode from Fly or Ghost cheat. | GameFramework/CheatManager.h |
|
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BeginDestroy () |
Called before destroying the object. | GameFramework/CheatManager.h | |
virtual bool ProcessConsoleExec
(
const TCHAR* Cmd, |
GameFramework/CheatManager.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void DisableDebugCamera() |
Switch controller from debug camera back to normal controller | GameFramework/CheatManager.h |
|
virtual void EnableDebugCamera() |
Switch controller to debug camera without locking gameplay and with locking local player controller input | GameFramework/CheatManager.h |
|
virtual AActor * GetTarget
(
APlayerController* PlayerController, |
Retrieve the given PlayerContoller's current "target" AActor. | GameFramework/CheatManager.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsDebugCapsuleSweepPawnEnabled() |
Return true if debug sweeps are enabled for pawns. | GameFramework/CheatManager.h | |
static FDelegateHandle RegisterForOnCheatManagerCreated
(
FOnCheatManagerCreated::FDelegate&& Delegate |
Register a delegate to call whenever a cheat manager is spawned; it will also be called immediately for cheat managers that already exist at this point | GameFramework/CheatManager.h | |
static void UnregisterFromOnCheatManagerCreated
(
FDelegateHandle DelegateHandle |
Unregister a delegate previously registered with CallOrRegister_OnCheatManagerCreated | GameFramework/CheatManager.h |