public static int XLuaPrivateAccessible(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); Type type = getType(L, translator, 1);; if (type == null) { return(LuaAPI.luaL_error(L, "xlua.private_accessible, can not find c# type")); } while (type != null) { translator.PrivateAccessible(L, type); type = type.BaseType(); } return(0); } catch (Exception e) { return(LuaAPI.luaL_error(L, "c# exception in xlua.private_accessible: " + e)); } }