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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With