diff --git a/Assets/XLua/Src/ObjectTranslator.cs b/Assets/XLua/Src/ObjectTranslator.cs index d29b0546d..41c8fe2e6 100644 --- a/Assets/XLua/Src/ObjectTranslator.cs +++ b/Assets/XLua/Src/ObjectTranslator.cs @@ -1189,6 +1189,16 @@ public void PushAny(RealStatePtr L, object o) Push(L, o); } } + else if(o is Dictionary) + { + LuaAPI.lua_newtable(L); + foreach (var item in o as Dictionary) + { + PushAny(L, item.Key); + PushAny(L,item.Value); + LuaAPI.xlua_psettable(L, -3); + } + } else { Push(L, o); @@ -1722,4 +1732,4 @@ public void Get(RealStatePtr L, int index, out decimal val) } } } -} \ No newline at end of file +}