Hi,
A friend of mine has been trying to convince me to consider Unity for my development for some time now. In the past it hasn’t been an option, but I do have a project coming up next year which could possibly use Unity.
The one sticking point is that the game will require runtime script compilation, and ideally using Lua.
Now I see that Unity offers Javascript, Python and C# scripting, but my friend suggested that it might be possible to bind Unity functions to lua scripts through the C++ plugin architecture. Could someone confirm that this is possible and how I would go about it? I had a look at the examples and I could see how I would go about setting up a Lua VM, but I couldn’t see how I could get access to Unity “objects” through the C++ plugin, and hence through the Lua scripts.
Now if your answer to the above question is positive, then I don’t need an answer to the second question. I know how to compile my scripts at runtime with a Lua VM. Let’s assume, however, that your answer to the first question was negative. The chances of me persuading my employer to accept Python are slim, but let’s also assume I can do that. Can the python scripts be compiled at runtime?
Essentially, what I need to be able to do is develop the game, essentially providing a rough draft, if you like, where all the gameplay is controlled by scripts, all of which are distributed as source code, not compiled. I then need to be able to pass the whole game off to other developers, and have them run the game, edit the scripts and through the scripts change gameplay elements.
I should indicate at this point that web and IPhone deployment should not be a consideration here. I know that you’re obviously going to disable runtime scripting for web deployment because you would not be able to sandbox the application, and therefore you would never be able to get security certificates for your plugin. And the IPhone more than likely has similar considerations. I get all that. I’m talking purely downloadable deployment on Mac and Windows.