private void OnValidate() { if (setAngleByDirection) { angle = VectorMath.Vector2ToDegree(direction.normalized, zeroDirection.normalized); setAngleByDirection = false; } if (setDirectionByAngle) { direction = VectorMath.DegreeToVector2(angle, zeroDirection.normalized); setDirectionByAngle = false; } }