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#?
+1
A:
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.
Charlie Salts
2010-03-26 21:21:22
Lua l = new Lua();l.DoFile("log.lua"); LuaFunction f = _LuaTestManager["log_info"] as LuaFunction;if (f != null) f.Call("My log message");Made it. Thanks
Gopalakrishnan Subramani
2010-03-26 21:22:58