Settings (C++)
UBlueprintCheatsSettings (UDeveloperSettings) and ABlueprintCheatsWorldSettings (per-level), plus the four-source resolution order.
Two settings classes ship with the plugin:
UBlueprintCheatsSettings— project-wide config (UDeveloperSettings).ABlueprintCheatsWorldSettings— per-level cheat list (AWorldSettingssubclass).
UBlueprintCheatsSettings
- Header:
Source/BlueprintCheats/Public/BlueprintCheatsSettings.h - Config:
BlueprintCheats(DefaultBlueprintCheats.ini)
UCLASS(Config=BlueprintCheats, DefaultConfig)
class BLUEPRINTCHEATS_API UBlueprintCheatsSettings : public UDeveloperSettings;
virtual FName GetCategoryName() const override { return TEXT("Plugins"); }The constructor uses ConstructorHelpers::FClassFinder /
FObjectFinder to seed defaults for the menu widget class, the
default IMC, and the per-argument widget map.
Properties
UPROPERTY(EditDefaultsOnly, Config, AdvancedDisplay, Category="UI")
TMap<TSubclassOf<UBlueprintCheatArgument>,
TSubclassOf<UBlueprintCheatArgumentWidgetBase>> ArgumentTypeToWidgetMap;
UPROPERTY(EditDefaultsOnly, Config, Category="Scripts")
TMap<TSoftObjectPtr<UWorld>, FCheatCollection> WorldEnabledScripts;
UPROPERTY(EditDefaultsOnly, Config, Category="Scripts")
TSet<TSoftClassPtr<UBlueprintCheatScript>> EnabledScripts;
UPROPERTY(EditDefaultsOnly, Config, Category="Scripts")
FString CheatsConsolePrefix = "";
UPROPERTY(EditDefaultsOnly, Config, Category="UI", AdvancedDisplay)
TSubclassOf<UBlueprintCheatsMenuWidgetBase> CheatsMenuClass;
UPROPERTY(EditDefaultsOnly, Config, Category="Input")
TSoftObjectPtr<UBlueprintCheatsInputMappingContext> InputMappingContext;
UPROPERTY(EditDefaultsOnly, Config, Category="UI") bool bPauseGameWithMenu = true;
UPROPERTY(EditDefaultsOnly, Config, Category="UI") bool bDisplayMessagesToPlayer = true;
UPROPERTY(EditDefaultsOnly, Config, Category="Build") bool bDisableOnShipping = true;| Property | Purpose |
|---|---|
EnabledScripts | Project-wide enabled scripts. Loaded on every match start. |
WorldEnabledScripts | Per-world overrides keyed by world asset. |
CheatsConsolePrefix | Prepended to every console command at registration time as <prefix>.<command>. Empty for no prefix. |
CheatsMenuClass | Widget class instantiated when the menu hotkey is pressed. |
ArgumentTypeToWidgetMap | Argument class → editor widget class. Add entries for custom argument subclasses. |
InputMappingContext | The IMC the subsystem registers on world match start. Carries MenuHotkey. |
bPauseGameWithMenu | Pauses the game while the cheat overlay is open. |
bDisplayMessagesToPlayer | Shows on-screen debug messages (5-second TTL) for execution outcomes. |
bDisableOnShipping | When true, UBlueprintCheatsSubsystem::ShouldCreateSubsystem returns false in shipping builds. |
FCheatCollection
USTRUCT(Blueprintable, BlueprintType)
struct FCheatCollection
{
GENERATED_BODY()
UPROPERTY(EditAnywhere, Category="Scripts")
TArray<TSoftClassPtr<UBlueprintCheatScript>> CheatScripts;
};Used as the value type in WorldEnabledScripts.
Reading settings at runtime
const UBlueprintCheatsSettings* Settings = GetDefault<UBlueprintCheatsSettings>();
const FString& Prefix = Settings->CheatsConsolePrefix;GetDefault is fine for read access — UDeveloperSettings config is
loaded into the CDO at startup.
ABlueprintCheatsWorldSettings
- Header:
Source/BlueprintCheats/Public/BlueprintCheatsWorldSettings.h
UCLASS()
class BLUEPRINTCHEATS_API ABlueprintCheatsWorldSettings : public AWorldSettings
{
GENERATED_BODY()
public:
virtual const TArray<TSoftClassPtr<UBlueprintCheatScript>>& GetWorldCheatScripts();
protected:
UPROPERTY(EditAnywhere, Category="Blueprint Cheats")
TArray<TSoftClassPtr<UBlueprintCheatScript>> WorldCheatScripts;
};A WorldSettings subclass for levels that own their cheat list
directly. To use it, switch the level's World Settings Class to
this class (Project Settings → Engine → General Settings, or via
per-level overrides), then populate WorldCheatScripts on the level's
World Settings actor.
GetWorldCheatScripts
Returns the array. Override in a subclass if you want to compute the list dynamically.
Resolution order
The subsystem unions cheats from these four sources on world match start:
UBlueprintCheatsSettings::EnabledScripts(global).UBlueprintCheatsSettings::WorldEnabledScripts[<this world>](global, per-world map).ABlueprintCheatsWorldSettings::WorldCheatScriptson the level's World Settings (level-owned).- Anything passed to
EnableScript/EnableScriptsat runtime.
There is no de-duplication step — if the same class appears in multiple sources you'll get one instance per appearance.