  We discuss the magnetic field influence on diffuse gamma-ray emission from
extragalactic electromagnetic cascades initiated by ultra-high energy cosmic
rays. Regions in space vary considerably in field strength: it is possibly of
10^(-12) G and lower in voids, of ~10^(-6) G inside galaxies, galactic clusters
and groups, of ~10^(-7) G around them, and of ~ 10^(-8)-10^(-9) G in filaments.
Structures having fields higher than in voids occupy comparatively small
fraction of the Universe, so they affect weakly on cascade emission. Still
knowledge of this influence may be relevant studying large-scale component of
the extragalactic magnetic field and to the search for exotic particles, as in
the latter case contribution of all components to extragalactic gamma-ray
background should be known, one of which is cascade emission. To study magnetic
field effect we simulate particle propagation in homogeneous magnetic field of
~10^(-6), 10^(-9), and 10^(-12) G and lower. It is found that in fields of
~10^(-9) G and lower the spectra of diffuse cascade gamma-rays at energies
E<=10^17 eV coincide. Thus no specific models of EGMF are required to study
contribution of cascade emission in the extragalactic gamma-ray background at
E<=10^17 eV. In the case of uniform field of 10^(-6) G (which seems to be
unrealistic), this inference is valid in the energy range of ~10^7-10^9 eV.
Results obtained can be also used studying large-scale component of the
extragalactic magnetic field.
