Skip to content

Instantly share code, notes, and snippets.

@baba-s
Created February 28, 2015 13:42
Show Gist options
  • Select an option

  • Save baba-s/9d09f023b3147801a90f to your computer and use it in GitHub Desktop.

Select an option

Save baba-s/9d09f023b3147801a90f to your computer and use it in GitHub Desktop.
using LuaInterface;
using UnityEngine;
public class LuaTest : MonoBehaviour
{
private Lua mLua;
private LuaFunction mLuaFunction;
private void Start()
{
var filename = Application.dataPath + "/luaTest.lua";
mLua = new Lua();
mLua.DoFile( filename );
mLuaFunction = mLua.GetFunction( "update" );
}
private void Update()
{
mLuaFunction.Call( Time.deltaTime );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment