x86.dll @RootDirectory\appserver\xclient\files\lua51.x86.dll /y 50: copy @RootDirectory\bin\dotnet\LuaInterface.x64 .dll @RootDirectory\appserver\xclient\files\LuaInterface.x64.dll /y 51: copy @RootDirectory\bin\dotnet \LuaInterface.x86.dll @RootDirectory\appserver\xclient\files\LuaInterface.x86.dll /y 52: copy @RootDirectory .dll @RootDirectory\appserver\bin\LuaInterface.x64.dll /y 102: copy @RootDirectory\bin\dotnet\LuaInterface.x86 .dll @RootDirectory\appserver\bin\LuaInterface.x86.dll /y 103: copy @RootDirectory\bin\dotnet\MongoDB.dll
翻译过程是一个递归的过程,如图为不同类型的语句块处理逻辑: [13.png] while循环的处理逻辑为: [14.png] 最终自动生成了Lua代码,如下所示: [15.png] ToLua ===== ToLua基于LuaInterface ,LuaInterface是一个实现Lua和微软.Net平台的CLR混合编程的开源库,使得Lua脚本可以实例化CLR对象,访问属性,调用方法甚至使用Lua函数来处理事件。
.NET通过LuaInterface开源项目类库实现对Lua的脚本调用以及Lua与C#的相互绑定,有关于这此方面的内容请大家搜索相关文章以获得帮助。 三、AgileEAS.NET SOA平台Lua引擎 AgileEAS.NET SOA5.0平台目前使用的是Lua5.1版本,使用LuaInterface实现C#与Lua的相互绑定处理,平台已经对其进行了二次封装以提供统一的
让我们再观察一下上图中Unity控制台的堆栈情况: LuaException: LuaFunction has been disposed LuaInterface.LuaFunction:BeginPCall