diff --git a/Assets/Plugins/Slua_Managed/LuaObject.cs b/Assets/Plugins/Slua_Managed/LuaObject.cs index 5bb827a9..a7bd61e9 100644 --- a/Assets/Plugins/Slua_Managed/LuaObject.cs +++ b/Assets/Plugins/Slua_Managed/LuaObject.cs @@ -672,7 +672,7 @@ public static bool matchType(IntPtr l, int p, LuaTypes lt, Type t) } else if (t == typeof(char[]) || t==typeof(byte[])) { - return lt == LuaTypes.LUA_TSTRING; + return lt == LuaTypes.LUA_TSTRING || lt == LuaTypes.LUA_TUSERDATA; } switch (lt) @@ -941,6 +941,7 @@ static public bool checkArray(IntPtr l, int p, out T[] ta) } else { + object obj = checkObj (l, p); Array array = checkObj(l, p) as Array; ta = array as T[]; return ta != null;