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
Properties
Delegate
The original delegate instance.
public Delegate Delegate { get; }
Property Value
IsVariadic
Whether this delegate accepts a variable number of arguments (i.e. a single parameter of type object[]).
public bool IsVariadic { get; }
Property Value
Owner
The Luau instance that owns this object.
public Luau Owner { get; }
Property Value
Parameters
The parameters of the delegate method.
public ParameterInfo[] Parameters { get; }
Property Value
ReturnType
The return type of the delegate method, or null if void.
public Type? ReturnType { get; }
Property Value
Methods
Invoke(LuaState)
public int Invoke(LuaState state)
Parameters
stateLuaState