Made For Unreal — Docs
Blueprint CheatsAPI ReferenceC++ API

UI (C++)

The three abstract UUserWidget subclasses that compose the cheat overlay — menu, row, argument widget.

The cheat overlay is composed of three abstract UUserWidget subclasses. All three are UCLASS(Abstract) and Blueprintable, so the typical workflow is to subclass them as Widget Blueprints — but their C++ surface is documented here for projects that need to override behavior in code or call into the menu directly.

UBlueprintCheatsMenuWidgetBase           ← whole overlay
 └── UBlueprintCheatScriptMenuItemBase   ← one row per enabled cheat
      └── UBlueprintCheatArgumentWidgetBase   ← one widget per argument

UBlueprintCheatsMenuWidgetBase

  • Header: Source/BlueprintCheats/Public/UI/BlueprintCheatsMenuWidgetBase.h
UCLASS(Abstract)
class BLUEPRINTCHEATS_API UBlueprintCheatsMenuWidgetBase : public UUserWidget
{
    GENERATED_BODY()

    DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnCheatMenuClosedSignature);

public:
    virtual void NativePreConstruct() override;
    virtual void SetCheatScripts(const TArray<UBlueprintCheatScript*>& CheatScriptsIn);

    FOnCheatMenuClosedSignature OnCheatMenuClosed;

protected:
    UFUNCTION(BlueprintNativeEvent, Category="Blueprint Cheats|UI")
    void OnMenuClosed();

    UPROPERTY()
    TArray<TObjectPtr<UBlueprintCheatScriptMenuItemBase>> CheatScriptUIs;

    UPROPERTY()
    TArray<UBlueprintCheatScript*> CheatScripts;

    UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
    TObjectPtr<UScrollBox> CheatsListView;

    UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
    TObjectPtr<UButton> CloseButton;
};

BindWidget requirements

The widget Blueprint must contain:

NameTypePurpose
CheatsListViewUScrollBoxContainer the subsystem populates with cheat rows.
CloseButtonUButtonCloses the menu.

Methods

  • SetCheatScripts(const TArray<UBlueprintCheatScript*>&) — receives the enabled scripts when the subsystem opens the menu. The default implementation builds one row per script via UBlueprintCheatScript::BuildWidget and adds it to CheatsListView. Override (call Super) for grouping, search, custom sort.
  • OnMenuClosedBlueprintNativeEvent. Default broadcasts OnCheatMenuClosed.
  • NativePreConstruct — wires the close button.

Delegate

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnCheatMenuClosedSignature);
FOnCheatMenuClosedSignature OnCheatMenuClosed;

The subsystem listens on this delegate (via LeaveMenu) to tear down the menu.


UBlueprintCheatScriptMenuItemBase

  • Header: Source/BlueprintCheats/Public/UI/BlueprintCheatScriptMenuItemBase.h
UCLASS(Abstract)
class BLUEPRINTCHEATS_API UBlueprintCheatScriptMenuItemBase : public UUserWidget
{
    GENERATED_BODY()

public:
    virtual void NativeConstruct() override;

    UFUNCTION(BlueprintCallable, BlueprintNativeEvent)
    void SetRelatedScript(const UBlueprintCheatScript* Script);

protected:
    UFUNCTION(BlueprintNativeEvent)
    void OnExecutionButtonClicked();

    UPROPERTY(BlueprintReadOnly, meta=(HideInDetailPanel))
    TMap<FName, UBlueprintCheatArgument*> ScriptCheatArguments;

    UPROPERTY(BlueprintReadOnly, meta=(HideInDetailPanel))
    TArray<TObjectPtr<UBlueprintCheatArgumentWidgetBase>> ArgumentWidgets;

    UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
    TObjectPtr<UHorizontalBox> ControlsContainer;

    UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
    TObjectPtr<UTextBlock> TitleTextBlock;

    UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
    TObjectPtr<UButton> ExecutionButton;

    UPROPERTY(BlueprintReadOnly)
    TObjectPtr<const UBlueprintCheatScript> RelatedScript;
};

BindWidget requirements

NameTypePurpose
TitleTextBlockUTextBlockDisplays the script's display name.
ControlsContainerUHorizontalBoxContainer the row populates with one argument widget per argument.
ExecutionButtonUButtonThe "run" button.

Events

  • SetRelatedScript(const UBlueprintCheatScript*)BlueprintNativeEvent. Default: caches the script, copies its expected arguments into ScriptCheatArguments, builds an argument widget per entry via UBlueprintCheatsUIFunctionLibrary::BuildWidgetForArgument, adds each to ControlsContainer.
  • OnExecutionButtonClickedBlueprintNativeEvent. Default: walks ArgumentWidgets calling CommitValue on each, then asks the subsystem to execute via ExecuteScript.

UBlueprintCheatArgumentWidgetBase

  • Header: Source/BlueprintCheats/Public/UI/BlueprintCheatArgumentWidgetBase.h
UCLASS(Abstract, Blueprintable)
class BLUEPRINTCHEATS_API UBlueprintCheatArgumentWidgetBase : public UUserWidget
{
    GENERATED_BODY()

public:
    UFUNCTION(BlueprintCallable, Category = "Blueprint Cheats|Arguments|UI")
    void SetExpectedArgument(UBlueprintCheatArgument* ExpectedArgumentIn);

    UFUNCTION(BlueprintCallable, BlueprintImplementableEvent, Category = "Blueprint Cheats|Arguments|UI")
    void CommitValue();

protected:
    virtual void NativeConstruct() override;

    UFUNCTION(BlueprintCallable, BlueprintImplementableEvent)
    void OnExpectedArgumentSet(UBlueprintCheatArgument* ExpectedArgumentIn);

    UPROPERTY(BlueprintReadOnly)
    TObjectPtr<UBlueprintCheatArgument> ExpectedArgument;

    UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
    TObjectPtr<UTextBlock> ArgumentDisplayNameBlock;
};

BindWidget requirements

NameTypePurpose
ArgumentDisplayNameBlockUTextBlockShows the argument's display name.

Events

  • SetExpectedArgument(UBlueprintCheatArgument*) — assigns the argument and fires OnExpectedArgumentSet.
  • OnExpectedArgumentSetBlueprintImplementableEvent. Read the argument's configuration here (defaults, min/max, enum options).
  • CommitValueBlueprintImplementableEvent. Push the widget's current value back into the argument before the cheat executes.
  • NativeConstruct — overridden to wire ArgumentDisplayNameBlock to the argument's display name.

Default widget map

The plugin ships one widget Blueprint per shipped argument class. The mapping is held in UBlueprintCheatsSettings::ArgumentTypeToWidgetMap and consumed by UBlueprintCheatsUIFunctionLibrary::BuildWidgetForArgument.

Argument classDefault widget asset
UBlueprintCheatBoolArgumentWBP_BlueprintCheats_BoolArgument
UBlueprintCheatIntArgumentWBP_BlueprintCheats_IntArgument
UBlueprintCheatFloatArgumentWBP_BlueprintCheats_FloatArgument
UBlueprintCheatDoubleArgumentWBP_BlueprintCheats_DoubleArgument
UBlueprintCheatStringArgumentWBP_BlueprintCheats_StringArgument
UBlueprintCheatEnumArgumentWBP_BlueprintCheats_EnumArgument