Over-flight and standoff tracking are the two typical modes of fixed wing unmanned aerial vehicle tracking ground targets. The guidance law of each mode is usually designed independently and thus shows different forms. In this paper, based on the constraints on unmanned aerial vehicle flight, a novel unitized guidance law, which is compatible with these two modes, is proposed. The stability of the guidance law is rigorously proved by a Lyapunov function, and the design of guidance parameters is discussed. Numerical simulation results show that the proposed guidance law can be used for automatically tracking the stationary and moving ground targets well, and also can switch between the two tracking modes smoothly.