Unmanned aerial vehicle (UAV) path planning aims to find the optimal flight path from the start point to the destination point for each aerial vehicle. With the rapid development of UAV technology, UAVs are required to tackle missions in increasingly complex environments. Consequently, UAV path planning encounters more challenges, causing traditional deterministic algorithms to struggle to find the optimal path within a certain time. Evolutionary computation (EC) is a series of nature-inspired methodologies and algorithms, which have shown effectiveness and efficiency in solving many complex optimization problems in real-world applications. Recently, EC algorithms have been effectively applied in UAV path planning and have shown encouraging performance in obtaining high-quality solutions. Therefore, it is crucial to review the related research experience and literature in the field of using EC for UAV path planning. This paper presents a comprehensive survey to showcase the existing studies on EC in UAV path planning, especially in complex environments. The paper first proposes a novel taxonomy to categorize the relevant studies into three different categories according to the complex environmental properties of the application scenarios. These environmental properties include complex search space, complex time control, and complex optimization objectives. Then, the EC algorithms for UAV path planning in these complex environments are further systematically surveyed as constrained search space and large-scale search space in complex search space, dynamic UAV path planning and multi-UAV concurrent path planning in complex time control, and expensive objective and multiple objectives in complex optimization objectives. Finally, some potential future research directions for applying EC algorithms to UAV path planning are presented and discussed.