/// <summary> /// 执行Lua方法 /// </summary> public static object[] CallMethod(string module, string func, params object[] args) { LuaClientStarter luaMgr = LuaClientStarter.instance; if (luaMgr == null) { return(null); } return(luaMgr.CallFunction(module + "." + func, args)); }
// Use this for initialization void Awake() { instance = this; loader = new LuaLoader(); lua = new LuaState(); this.OpenLibs(); lua.LuaSetTop(0); LuaBinder.Bind(lua); LuaCoroutine.Register(lua, this); }