/UE-BUICheatManager

Cheat manager providing a way of defining cheat shortcuts e.g. game.car.spawn

Primary LanguageC++Creative Commons Zero v1.0 UniversalCC0-1.0

BUI Cheat Manager

Usage

  1. Create a C++ subclass of UBUICheatManagerBase:
#pragma once

#include "BUICheatManagerBase.h"
#include "MyCheatManager.generated.h"

UCLASS( meta = ( CheatPrefix = "mygame." ) )
class UMyCheatManager : public UBUICheatManagerBase
{
	GENERATED_BODY()

public:
	UFUNCTION( exec, meta = ( Cheat = "car.spawn" ) )
	void SpawnCar( int32 num );
};
  1. Add cheat functions as you would normally, but add the tag "Cheat" with a shortcut name.
  2. Create a Blueprint subclass of your Cheat Manager. This step is required. The shortcut names only work by using the asset tags registry.
  3. Set your PlayerController to use the Blueprint subclass of your Cheat Manager.
  4. Play the game and press tilde ` to bring up the console. Your cheats will be listed in Cyan with the prefix set in CheatPrefix.

Thanks

Huge thanks to Geordie Hall at Bit Dragon for the bulk of this technique.