void OnDrawGizmosSelected() { waypoints.DrawWaypoints(); // If the agent is in Patrol if (currentState == State.Patrol) { Gizmos.color = Color.red; Gizmos.DrawWireSphere(transform.position, detectionRadius); } }