Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将.net 中的 LuaInterface 用于我正在处理的一个大型项目。是否可以将字符串直接转换为 LuaFunction(类似于 LoadString() 的工作方式?)。
LuaInterface 有LoadString,就是把lua源代码解析成一个LuaFunction,然后就可以用这个Call方法来执行函数了。
LoadString
LuaFunction
Call
static void Main(string[] args) { Lua lua = new LuaInterface.Lua(); LuaFunction func = lua.LoadString("return 5", "name for debugging"); func.Call(); }