I've implemented LuaPlus in my engine eventmanager successfully and really like the flexibility I gained. But I'm still not exactly where I want to be, because I can't link my c++ classes to a Lua class.
For example, I have a Actor class in C++, and I want to be able to create the same class in Lua and gain access to members with LuaPlus, but I can't figure how I can achieve that.
Is this actually LuaPlus built-in functionality, or do I have to write my own interface that exchanges data tables between C++ and Lua?
My current approach would be to fire an event in Lua that creates an new actor class in C++ code, and transfer its ID and the data I need to back to Lua. When I modify the data I send the modifications back to C++ code again, but I actually thought there's something in LuaPlus that exposes this functionality already.
__gc
but not tables or light userdata? It's a mystery! \$\endgroup\$