delegates.bind
Binds a reflected Unreal delegate to an existing UFunction.
Syntax
ue.delegates.bind(owner: UObjectProxy, property: string, listener: UObjectProxy, function_name: string) -> integer?, string?Parameters
| Parameter | Type | Description |
|---|---|---|
owner | UObjectProxy | Object that owns the delegate property. |
property | string | Reflected delegate property name. |
listener | UObjectProxy | Object that exposes the receiver UFunction. |
function_name | string | Exact compatible UFunction name. |
Returns
| Type | Description |
|---|---|
integer | Native binding ID. |
nil, string | Property, function, or signature validation failed. |
Example
local id = assert(ue.delegates.bind(
button,
"OnClicked",
widget,
"HandleStartClicked"
))Notes
- Supports multicast and single-cast reflected delegates.
- A Lua closure cannot be inserted directly into Unreal's native invocation list.