static int ForceInit(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); Nova.ScriptLoader obj = (Nova.ScriptLoader)ToLua.CheckObject <Nova.ScriptLoader>(L, 1); string arg0 = ToLua.CheckString(L, 2); obj.ForceInit(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
/// <summary> /// dirty force reload, simply reload all scripts, does not take too much in consideration. /// this method is only used for faster iteration during development, like preview changes in scripts without /// restart the game /// </summary> public void ReloadScripts() { scriptLoader.ForceInit(scriptPath); flowChartTree = scriptLoader.GetFlowChartTree(); UpdateGameState(true, true, false, false); }
/// <summary> /// Used for faster iterations during the development, like to modify scripts without restarting the game /// </summary> public void ReloadScripts() { LuaRuntime.Instance.Reset(); scriptLoader.ForceInit(scriptPath); flowChartTree = scriptLoader.GetFlowChartTree(); }