The range attack is not the same for all units. (see damage by attack).
First, note that attack range and sight are related together, as an enemy unit can't be attacked if you don't see it.
(That's available for close combat, not bombardment, which is made mostly often blindnessly.)
Other factors modify the sight of an enemy unit, as weather, or the enemy's camouflage
So, range attacks are linked to :