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 argumentUBlueprintCheatsMenuWidgetBase
- 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:
| Name | Type | Purpose |
|---|---|---|
CheatsListView | UScrollBox | Container the subsystem populates with cheat rows. |
CloseButton | UButton | Closes 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 viaUBlueprintCheatScript::BuildWidgetand adds it toCheatsListView. Override (callSuper) for grouping, search, custom sort.OnMenuClosed—BlueprintNativeEvent. Default broadcastsOnCheatMenuClosed.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
| Name | Type | Purpose |
|---|---|---|
TitleTextBlock | UTextBlock | Displays the script's display name. |
ControlsContainer | UHorizontalBox | Container the row populates with one argument widget per argument. |
ExecutionButton | UButton | The "run" button. |
Events
SetRelatedScript(const UBlueprintCheatScript*)—BlueprintNativeEvent. Default: caches the script, copies its expected arguments intoScriptCheatArguments, builds an argument widget per entry viaUBlueprintCheatsUIFunctionLibrary::BuildWidgetForArgument, adds each toControlsContainer.OnExecutionButtonClicked—BlueprintNativeEvent. Default: walksArgumentWidgetscallingCommitValueon each, then asks the subsystem to execute viaExecuteScript.
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
| Name | Type | Purpose |
|---|---|---|
ArgumentDisplayNameBlock | UTextBlock | Shows the argument's display name. |
Events
SetExpectedArgument(UBlueprintCheatArgument*)— assigns the argument and firesOnExpectedArgumentSet.OnExpectedArgumentSet—BlueprintImplementableEvent. Read the argument's configuration here (defaults, min/max, enum options).CommitValue—BlueprintImplementableEvent. Push the widget's current value back into the argument before the cheat executes.NativeConstruct— overridden to wireArgumentDisplayNameBlockto 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 class | Default widget asset |
|---|---|
UBlueprintCheatBoolArgument | WBP_BlueprintCheats_BoolArgument |
UBlueprintCheatIntArgument | WBP_BlueprintCheats_IntArgument |
UBlueprintCheatFloatArgument | WBP_BlueprintCheats_FloatArgument |
UBlueprintCheatDoubleArgument | WBP_BlueprintCheats_DoubleArgument |
UBlueprintCheatStringArgument | WBP_BlueprintCheats_StringArgument |
UBlueprintCheatEnumArgument | WBP_BlueprintCheats_EnumArgument |