add_widget_property_binding
Bind a widget property to a pure, parameterless function on its Widget Blueprint so the value recomputes each frame, replacing any existing binding.
Instructions
Bind a widget PROPERTY to a function of the Widget Blueprint -- the Designer's "Bind" dropdown, headless. The property then recomputes every frame from that function instead of holding a fixed value (a health bar's Percent, a label's Text, a panel's Visibility). TWO RULES, both enforced by the ENGINE'S OWN validator (FDelegateEditorBinding::IsBindingValid, the same code the UMG compiler runs -- this tool does not second-guess it): the property is bindable only if its widget declares a companion delegate named "Delegate" (Text -> TextDelegate), and the function must have a COMPATIBLE SIGNATURE (same return type, NO parameters) and be PURE (BlueprintPure or const), because it is called while painting. A refusal names which of the two failed and, when the property is not bindable at all, lists the ones that are. Create the function first with add_blueprint_function + set its return type; one property can hold only ONE binding, so re-binding the same property REPLACES it (reported in replaced_existing).
Returns: { widget_bp_path: string, widget_name: string, property_name: string, function_name: string, bound: bool, valid: bool, replaced_existing: bool, member_guid: string, validation_messages: [string], bindable_properties?: [string], saved: bool, save_error: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | Compile + save the Widget Blueprint when done (default true). The compile is what turns the editor binding into the runtime one, so a false here leaves the binding authored but not live. | |
| force | No | Optional. This command is REFUSED while a Play-in-Editor session is running: it either compiles a Blueprint (the reinstancer can retain a world, and CheckForWorldGCLeaks is Fatal -- it KILLS the editor) or writes to disk (Editor.AllowSavingAssetsDuringPIE=0 makes the engine refuse the write, so it would report success without writing a byte). Stop PIE and retry instead; force=true runs it anyway, at your own risk. | |
| widget_name | Yes | Name of the widget in the tree whose property gets bound (must be a direct variable of the UserWidget) | |
| function_name | Yes | Name of the function ON THIS Widget Blueprint that supplies the value. Must be pure and take no parameters, returning the property's type. | |
| property_name | Yes | Property to bind, e.g. "Text" on a TextBlock, "Percent" on a ProgressBar, "Visibility" on any widget. Must have a companion "<property_name>Delegate" on the widget's class. | |
| blueprint_name | No | Alias of `widget_bp_path` (same value, same meaning). Accepted because sibling tools spell this parameter differently; prefer `widget_bp_path`. | |
| widget_bp_path | No | /Game path of the Widget Blueprint asset |