yurembo Posted 14 hours ago Posted 14 hours ago How can I implement a function in C++ engine code and then call it from Lua code? And vice versa: call a Lua function from C++ code? Quote
Solution Josh Posted 9 hours ago Solution Posted 9 hours ago This will call a Lua function from C++: https://www.leadwerks.com/learn/CallFunction?lang=cpp This will get the engine's Lua sol state: https://www.leadwerks.com/learn/GetLuaState?lang=cpp&nolua=1 And this page has a lot of examples showing how to expose C++ classes and functions: https://www.leadwerks.com/learn/Scripting?lang=cpp Sol2 is a VERY deep dive, but it does everything I have wanted to do. Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.