Table of Contents

Class LuauDelegate

Namespace
LuauInterop.Runtime
Assembly
LuauInterop.dll

Wraps any C# delegate for use as a Luau function. Handles argument marshalling and return value pushing automatically.

public sealed class LuauDelegate
Inheritance
LuauDelegate
Inherited Members

Constructors

LuauDelegate(Luau, Delegate)

public LuauDelegate(Luau owner, Delegate del)

Parameters

owner Luau
del Delegate

Properties

Delegate

The original delegate instance.

public Delegate Delegate { get; }

Property Value

Delegate

IsVariadic

Whether this delegate accepts a variable number of arguments (i.e. a single parameter of type object[]).

public bool IsVariadic { get; }

Property Value

bool

Owner

The Luau instance that owns this object.

public Luau Owner { get; }

Property Value

Luau

Parameters

The parameters of the delegate method.

public ParameterInfo[] Parameters { get; }

Property Value

ParameterInfo[]

ReturnType

The return type of the delegate method, or null if void.

public Type? ReturnType { get; }

Property Value

Type

Methods

Invoke(LuaState)

public int Invoke(LuaState state)

Parameters

state LuaState

Returns

int