diff --git a/Assets/ToLua/Core/ToLua.cs b/Assets/ToLua/Core/ToLua.cs index c4ab5971..198e1aad 100644 --- a/Assets/ToLua/Core/ToLua.cs +++ b/Assets/ToLua/Core/ToLua.cs @@ -791,7 +791,13 @@ public static object ToVarObject(IntPtr L, int stackPos) switch (type) { - case LuaTypes.LUA_TNUMBER: + case LuaTypes.LUA_TNUMBER: +#if LUAC_5_3 + if (LuaDLL.lua_isinteger(L, stackPos) != 0) + { + return LuaDLL.lua_tointeger(L, stackPos); + } +#endif return LuaDLL.lua_tonumber(L, stackPos); case LuaTypes.LUA_TSTRING: return LuaDLL.lua_tostring(L, stackPos); @@ -3008,4 +3014,4 @@ public static void SubRef(this Delegate arg) } } } -} \ No newline at end of file +} diff --git a/Assets/ToLua/Editor/ToLuaMenu.cs b/Assets/ToLua/Editor/ToLuaMenu.cs index 8f586abb..31c29d30 100644 --- a/Assets/ToLua/Editor/ToLuaMenu.cs +++ b/Assets/ToLua/Editor/ToLuaMenu.cs @@ -1570,6 +1570,7 @@ static void ExportLuaBytecode(string srcFile, string outFile) RedirectStandardInput = true, RedirectStandardError = true, WorkingDirectory = exedir, + CreateNoWindow = true, }; if (!isWin)