Created
February 28, 2015 13:42
-
-
Save baba-s/9d09f023b3147801a90f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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