void Start() { LuaState = new Lua(); LuaState.LoadUnityExpand(); LuaState.LoadImportExpand(); LuaState.LoadCLRPackage("Using"); LuaState.CallLunaFunction("lunatest.lua", "Start", this.gameObject); LuaState.CheckStack(); }
void Start() { LuaState = new Lua(); LuaState.LoadCLRPackage(); LuaState.LoadUnityExpand(); var ret = LuaState.DoString(@"return require 'requiretest'"); TestLib = ret[0] as LuaTable; var startCallback = TestLib["Start"] as LuaFunction; startCallback.Call(this.gameObject); }