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

ParameterTypeDescription
ownerUObjectProxyObject that owns the delegate property.
propertystringReflected delegate property name.
listenerUObjectProxyObject that exposes the receiver UFunction.
function_namestringExact compatible UFunction name.

Returns

TypeDescription
integerNative binding ID.
nil, stringProperty, 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.

On this page