From 55694a2ebd5cbcffd17689a684318f2b71f04fc2 Mon Sep 17 00:00:00 2001 From: Jozhn Date: Mon, 1 Feb 2021 16:09:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=AF=BC=E5=87=BAbytecode=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E6=89=93=E5=BC=80CMD=E7=AA=97=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E6=8F=90=E9=AB=98=E5=AF=BC=E5=87=BA=E9=80=9F=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ToLua/Editor/ToLuaMenu.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/ToLua/Editor/ToLuaMenu.cs b/Assets/ToLua/Editor/ToLuaMenu.cs index 8f586abb..141abeb6 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) From 1c539a8cad30f3b5ea806621ac64def40b0d2c91 Mon Sep 17 00:00:00 2001 From: Jozhn Date: Mon, 1 Feb 2021 16:11:54 +0800 Subject: [PATCH 2/3] Update ToLuaMenu.cs --- Assets/ToLua/Editor/ToLuaMenu.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/ToLua/Editor/ToLuaMenu.cs b/Assets/ToLua/Editor/ToLuaMenu.cs index 141abeb6..31c29d30 100644 --- a/Assets/ToLua/Editor/ToLuaMenu.cs +++ b/Assets/ToLua/Editor/ToLuaMenu.cs @@ -1570,7 +1570,7 @@ static void ExportLuaBytecode(string srcFile, string outFile) RedirectStandardInput = true, RedirectStandardError = true, WorkingDirectory = exedir, - CreateNoWindow = true, + CreateNoWindow = true, }; if (!isWin) From c951080363db06c6de86a8f58ce58d7b666c9070 Mon Sep 17 00:00:00 2001 From: Jozhn Date: Mon, 1 Feb 2021 17:35:15 +0800 Subject: [PATCH 3/3] =?UTF-8?q?lua=205.3=20C#=E4=BC=A0=E5=8F=82=E7=BB=99Lu?= =?UTF-8?q?a=E6=97=B6=E5=8C=BA=E5=88=86Int=E5=92=8C=E5=85=B6=E4=BB=96?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lua 5.3 C#传参给Lua时区分Int和其他类型,否则lua传整数之后收到的是小数 --- Assets/ToLua/Core/ToLua.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 +}