Skip to content

Instantly share code, notes, and snippets.

@cdhowie
cdhowie / lua-printproxy.cs
Created November 15, 2013 15:36
Proxying print() calls in Lua to C# (using Eluant)
using System;
using System.Text;
using Eluant;
class Example {
static void Main() {
using (var runtime = new LuaRuntime()) {
using (var proxy = runtime.CreateFunctionFromDelegate(new Action<LuaTable>(PrintProxy))) {
runtime.Globals["printproxy"] = proxy;
}