// =========================================== // Function for Drawing // =========================================== #if UNITY_EDITOR private void OnDrawGizmos() { if (drawGizmos) { targetScanner.EditorGizmo(transform); } }
void OnDrawGizmosSelected() //显示两个范围 { targetScanner.EditorGizmo(transform); // Gizmos.color = Color.red; // Gizmos.DrawWireSphere(transform.position, lookRadius); Gizmos.color = Color.yellow; Gizmos.DrawWireSphere(OriginPosition, followRadius); }