- Home /
Integrating Lua scripting into Unity game
I'd like in my next project make modding API and Lua seems to be perfect language for the task. It is fast, flexible and easy to sandbox. But is it possible to integrate it into Unity game? Had it been done?
Answer by Bunny83 · Feb 27, 2013 at 12:41 PM
If you really searched for it you should have found this page. In the C# section the last one (UniLua) is a 100% managed implementation of lua optimised for Unity3d. I haven't tested it yet, but it's "mostly" complete. Some features are missing or not done yet. See for yourself.
The big advantage of 100% managed code is that you can run it even in webbuilds or mobile builds and don't require Unity pro (for plugin support). Wrappers only work for a certain platform.
This is nice project to keep an eye on, but I'd need to wait until os module become available.
Answer by hoy_smallfry · Feb 25, 2013 at 01:27 AM
It's possible to integrate it to C, therefore its possible to integrate it to C#. I personally have never done it, but I know someone on a former team that has made an interop library for the three languages. So, I assume possible to integrate it into Unity once you have a C# DLL.
Edit
You can reate your own DLL, or use one that's already exists, such as LuaInterface. Then, I think its all a matter of how much you know about integrating Lua.
Yeah, but I couldn't find any documentation of this library. On it's GoogleCode page there's only download and changelog. No documentation.
Thanks! Please convert it to answer so I can mark it as best answer, Roger!
Answer by RogerCapiche · Feb 27, 2013 at 11:46 AM
If I recall correctly this was a pretty good tutorial for using LuaInterface in C#.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Problem when intergrate openfeint in unity3d 0 Answers
Is there a way to display integration test results in the editor GUI? 1 Answer
Integration of Unity and Eclipse 1 Answer
FB.Apprequest problem 0 Answers