Going deep into sensors, you want each actions to get values from the sensors.

Below is an example of how to set up a target sensor, an action and a range sensor.

The TargetSensor has a Target.

The RangeSensor has a range and evaluates if it is in Range using the Target from the TargetSensor.

The GoToAction uses both TargetSensor and RangeSensor.

(At the moment the code is pseudo and not yet tested)

public class TargetSensor : Sensor
{
      public Transform Target;

      public float DistanceToTarget => Vector3.Distance(Agent.transform.position, Target.position);
      public bool HasTarget => Target != null;

      public override void OnAwake()
      {
          Agent.States.AddState("hasTarget", 1);
      }
}

  public class GoToAction : BasicAction
  {
      public TargetSensor TargetSensor;
      public RangeSensor RangeSensor;

      public override EActionStatus Perform()
      {
					// The HasTarget here is unneeded as RangeSensor also calls it, but this is an example on how you can share functionality
          if (TargetSensor.HasTarget && RangeSensor.InRange)
          {
              return EActionStatus.Success;
          }
          else
          {
              return EActionStatus.Failed;
          }
      }
  }

  public class RangeSensor : Sensor
  {
      public TargetSensor TargetSensor;
      public float Range = 2;

      public bool InRange => TargetSensor.HasTarget && TargetSensor.DistanceToTarget <= 2;

      public override void OnAwake()
      {
      }

      private void Update()
      {
          if (TargetSensor.Target == null)
              return;

          if (InRange)
              Agent.States.SetState("InShootingRange", 1);
          else
              Agent.States.RemoveState("InShootingRange");
      }
  }