Search code examples
c#.netlualuainterfacelua.net

How to call Lua functions from .NET


I use the LuaInterface library to run the lua in .net and it works fine. I could access the CLR via lua. But how to call Lua function from C#?


Solution

  • You'll need to get a reference to a LuaFunction, from which you can use the Call() function.

    Sample code can be found on this website.

    It seems that in the last 3 years or so, LuaInterface has become a bit less popular and less supported.

    In any case, here's a newer link to a Channel 9 blog post that has some sample code.