public void OnDrawGizmosSelected()
        {
            if (!enabled || !ShowGizmos || !Reference.Value || MaxDistance == null || !ConstrainInEditMode)
            {
                return;
            }

            Gizmos.color = Color.cyan.Alphaed(.2f);
            Gizmos.DrawSphere(Reference.position, MaxDistance.Value);
            HandleExt.Text(transform.position + Vector3.forward * (MaxDistance.Value + 1), "Clamping Distance", true);

            if (!Application.isPlaying)
            {
                Constrain();
            }
        }
Exemple #2
0
 public void OnDrawGizmosSelected()
 {
     Gizmos.color = UnityEngine.Color.blue;
     Gizmos.DrawLine(transform.position, transform.position + currentValue);
     HandleExt.Text(transform.position + currentValue, $"Current value: {currentValue}", true);
 }