Bindings.cpp
#1
Okay, I was trying to modify /src/Bindings/Bindings.cpp in order to change the API. (Change the Lua Binding command from UnloadUnusedChunks to QueueUnloadUnusedChunks)

The changes aren't showing up in Git. In fact, when I checked the repository, I couldn't find Bindings.cpp at all. So, where did this come from - it doesn't seem auto generated. What do I do with thing?
Reply
Thanks given by:
#2
The file is auto-generated, by the ToLua+ program. It scans the header files and creates Lua bindings for specifically marked classes and functions - that's what all the "// tolua_export" comments are for.
Normally to export a function to the Lua API, you need to mark it with the comment, or make sure it is inside between "// tolua_begin" and "// tolua_end". Then, if you're on windows, you need to manually update the Bindings file, by running script file $/src/Bindings/AllToLua.bat. Linux build system should take care of this step automatically.
Reply
Thanks given by:
#3
Oh. OHHH! Alright, that helps massively!
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)