widgets.bind_native
Connects a native widget delegate to an existing receiver UFunction and observes it from Lua.
Syntax
ue.widgets.bind_native(control: UObjectProxy, delegate: string, receiver: UObjectProxy, function_name: string, callback: function) -> integer?, integer? | nil, stringParameters
| Parameter | Type | Description |
|---|---|---|
control | UObjectProxy | Widget that owns the delegate. |
delegate | string | Exact delegate property name. |
receiver | UObjectProxy | Object with a compatible receiver UFunction. |
function_name | string | Exact receiver UFunction name. |
callback | function(receiver, params) | Lua observer for the receiver call. |
Returns
| Type | Description |
|---|---|
integer, integer | Native binding ID and Lua subscription ID. |
nil, string | Delegate, receiver, or signature validation failed. |
Example
local native_id, subscription_id = assert(
ue.widgets.bind_native(
button,
"OnClicked",
screen,
"LuaResetClicked",
function()
print("clicked")
end
)
)Notes
- Use for exact native delivery or game-specific delegates.
- The receiver UFunction must already exist.