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