我试图使用C++将一个对象通过基类指针从LuaBridge传递到Lua。派生类和基类都在LuaBridge中正确注册。在C++方面:// exposing the a, b,void Bar(const FooBase* foo) // Assume that 'foo' is a pointer to a
我使用LuaJit和LuaBridge编译并执行lua代码。当lua代码抛出错误时,真的很难调试-我不知道它发生在哪一行,也不知道是什么导致了它。加载和调用lua函数的Psuedo代码: int result = luaL_loadstring(L, script.c_str());auto string_module = luabridge::getGlobal(L, "string");
auto str
为了简单起见,让我们这样描述它: int *myArray = new int[mySize]; 使用LuaBridge,我们可以假设我已经成功地将它注册为全局名称空间中的my_array。<return-type> DoForEach (<function-signature that includes luabridge::LuaRef>) // execute callbackusing luabridge::LuaRef, which I think I know how to