We need to use some specific library written in Lua in unity application.
Is there any possible way aside from complete rewriting it in C#/JS?
We need to use some specific library written in Lua in unity application. Is
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re targeting the web player, no. Web player builds run in a sandbox and cannot load external code, so with the possible exception of writing a Lua interpreter in C# (!), you’re out of luck.
If you’re targeting a desktop build or mobile device, then you can include external plugins and call out to them through scripts. This means you can import Lua and tell it to run your Lua script(s).
However, this may still be more trouble than it’s worth, since you’ll have to load and initialize the Lua runtime yourself, and therefore you might be better off just rewriting the code.
Note that for desktop platforms, a Pro license is required. For mobile platforms (iOS/Android), you may need to jump through some hoops to actually have your Lua script files available to load into the Lua runtime.