Table of Contents

Class LuauCallback

Namespace
LuauInterop.Runtime
Assembly
LuauInterop.dll

A C# function exposed to Luau.

public class LuauCallback : IDisposable
Inheritance
LuauCallback
Implements
Inherited Members

Constructors

LuauCallback(Luau, Func<Luau, LuaState, int>)

public LuauCallback(Luau owner, Func<Luau, LuaState, int> managed)

Parameters

owner Luau
managed Func<Luau, LuaState, int>

Properties

FunctionPointer

The function pointer to pass to Luau.

public nint FunctionPointer { get; }

Property Value

nint

IsDisposed

Whether this object has been disposed.

public bool IsDisposed { get; }

Property Value

bool

Managed

The managed function that this callback wraps.

public Func<Luau, LuaState, int> Managed { get; }

Property Value

Func<Luau, LuaState, int>

Native

The native delegate instance, which is passed to Luau.

public LuauCallback.NativeDelegate Native { get; }

Property Value

LuauCallback.NativeDelegate

Owner

The Luau instance that owns this object.

public Luau Owner { get; }

Property Value

Luau

Pin

The pinned handle for the native delegate, to prevent GC collection.

public GCHandle Pin { get; }

Property Value

GCHandle

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~LuauCallback()

protected ~LuauCallback()