public static void InitLuaModule(LuaVM vm) { var script = vm.GetScriptObject(); var t = new Table(script); t["GetTextFromFile"] = (Func <string, string>)(GetTextFromFile); t["IsDebug"] = (Func <bool>)(IsDebug); vm.SetGlobal("UnityOs", t); }
public static void ExecCmd(int fc, string cmd) { commandVM.SetGlobal("__me", fc); commandVM.ExecuteString(cmd); }