// Use this for initialization void Start() { if (isUseLua) { mgr = new LuaScriptMgr(); mgr.Start(); LuaState l = mgr.lua; string readToEnd = ConfigFileReader.FilePath(Path.Combine(Application.streamingAssetsPath, "LuaFile/LuaManager.lua")); mgr.DoString(readToEnd); } }
IEnumerator DelayCloseLua() { yield return(new WaitForEndOfFrame()); mgr.Destroy(); mgr = new LuaScriptMgr(); mgr.Start(); LuaState l = mgr.lua; string readToEnd = ConfigFileReader.FilePath(Path.Combine(Application.streamingAssetsPath, "LuaFile/LuaManager.lua")); mgr.DoString(readToEnd); }
public static void DoFile(string luafile) { string readToEnd = ConfigFileReader.FilePath(Path.Combine(Application.streamingAssetsPath, "LuaFile/" + luafile + ".lua")); instance.mgr.DoString(readToEnd); }