uLua - Lua for Unity

1475853--81425--$ulualogo.jpg

uLua Asset Store Page

Lua + LuaJIT + LuaInterface

Supported Platforms: iOS, Android, Windows, Mac, Linux

Want Lua support in your project? This package comes with everything you need, ready to go on all of the major platforms.

Features:

  • Lua 5.1.4 for all supported platforms
  • Amazing Lua performance thanks to LuaJIT
  • LuaInterface based for powerful C# integration
  • Additional LuaInterface features: Lua Coroutines, Unity error handling, more Lua API functions
  • Prebuilt Lua plugin

See readme for usage.
ulua-support@polynationgames.com
E-mail us for support if anything is not working. We’ll try our best to help!

We can add more examples on request.

Nice! I remember there being another plugin a while back when I was looking into this (kopilua). I suppose this solves most of the issues surrounding integration. I guess you took the dll route (hence LuaInterface) so definitely can’t use this for browser runtime.

Also one of the main reason I took interest in using Lua in Unity is to allow scripting during runtime and be able to execute it. I’m guessing this plugin allows for that?

Great plugin,

Does this work on Web Player ?

Cheers.

Cool, been looking for a nice Unity-Lua integration, will probably pick this up later : )

The LuaInterface DLL works fine in browsers/web player. The Dialogue System for Unity uses George Foot’s KopiLuaInterface, which you can see in action in all the browser demo scenes here: http://www.pixelcrushers.com/dialogue-system-demos/

I don’t see why uLua would be any different.

You might need to check Unity’s usage guidelines for their logo, not sure you’re allowed to make it blue etc.

Very cool, are you 100% sure about this?

Since Unity accepted this asset on the store im pretty sure it ok : )

@topherr

“Unity does not support Native Plugins for the WebPlayer, so uLua will never work until they change that policy due to using a C library for the Lua runtime.”

Is there a way to make this package work with WebPlayer like KopiLuaInterface from George Foot ? Pixel Crusher got KopiLuaInterface working in the Dialogue System.

Cheers.

You just need to play the demos to see proof. :wink: It uses KopiLua, which is a pure C# implementation of Lua, so no issues with C libraries.

Sorry, I didn’t mean to sidetrack this thread. Since virror wrote “LuaInterface based for powerful C# integration,” I figured uLua would be the same, which is the only reason why I mentioned it.

I spoke to topherr and he’s using a C-runtime (probably of the JIT). It’s also probably faster than the C# runtime version (not sure how much faster).

Perhaps Topherr could provide more info.

Cheers.

@TonyLi,

In the case that uLua is much faster than KopiLua, would it be possible for your Dialogue System to add support for uLua in addition to KopiLua.

I’m kind of interested in a Lua add-on for unity, but there’s not a lot of info about this and what it’s capable of. The lack of replies from the author is a bit discerning. :frowning:

I’ve been emailing the author and he’s answering right away. Perhaps he’s not getting notifications from the forum… I did inform him that people are using the forum.

@Virror,

Videos and example documentations would really help potential buyers appreciate the power and flexibility of uLua.

Cheers.

I haven’t done any benchmarking, but I can’t imagine that the C implementation would be significantly faster than the C# implementation in most cases. They’re both written in native, compiled languages. I’d be curious to see if there was any performance difference in benchmarks. Even if there were, for the Dialogue System it wouldn’t make any difference in performance for the player because of where Lua is used in it. However, if you really wanted to swap out KopiLuaInterface, as I mentioned earlier on the Dialogue System thread there’s a bridge class between the Dialogue System and whatever Lua implementation is underneath. You could always replace that bridge class with one that references a different Lua implementation.

Hey guys,

I got rocki’s e-mail and it seems my notifications weren’t working, but I’ll keep an eye on it and get some answers for people.

Additionally currently looking into WP8 version, and C# interpreters to cover the WebPlayer but it will lose the performance of LuaJIT.

Yes it does, additionally it provides a means to DLC game logic (missions, scripted abilities etc) which you otherwise cannot do in Unity at the moment.

What info would you like? Generally I’m also working on our game that we put uLua together for, so I’ve not had time to put up a website.

I can’t comment on existing C# implementations at the moment but uLua uses LuaJIT which when compared to the standard Lua runtime has -huge- performance improvements.

Check here for benchmarks comparing LuaJIT with
http://luajit.org/performance_x86.html

Sorry, the JIT support slipped my mind when I was replying. Yes, I won’t argue at all that this will make it faster than KopiLuaInterface. For the purposes of the Dialogue System, it won’t make any noticeable difference, but I can imagine uses where it would make a big difference.