Unity Package v0.2.0
Pre-releaseUnity Package for LunarBind. Includes required up-to-date MoonSharp source files and License.
The current MoonSharp available on the unity asset store is an outdated release and will not work with this build.
Added features for Unity:
IEnumerator
s are now valid to yield on when running a ScriptFunction
with StartCoroutine(scriptFunction.AsUnityCoroutine())
or StartCoroutine(scriptFunction.CloneUnityCoroutine())
You can use coroutine.yield(IEnumerator coroutine)
in Lua to start a coroutine and wait for it to finish.
If you use the ScriptRunners feature, you will have access to two new Unity helper functions available in Lua:
Unity.AwaitCoroutine(IEnumerator coroutine)
will start a coroutine on a dedicated GameObject and wait for it to finish
Unity.StartCoroutine(IEnumerator coroutine)
will start a coroutine on a dedicated GameObject and continue immediately
If you already have MoonSharp and/or LunarBind installed in Unity, please delete the files under Assets/Plugins/ before importing the package.