static int LoadCustomObjects_Lua(IntPtr L) { var objs = ResMgr.LoadAllCustomObjects(Api.lua_chkstring(L, 1), Api.lua_chkstring(L, 2)); Api.lua_createtable(L, objs.Length, 0); for (int i = 0; i < objs.Length; ++i) { lua.Lua.PushObjectInternal(L, objs[i]); Api.lua_seti(L, -2, i); } return(1); }