9 [Serializable]
public class Range :
Pick<float> {
10 [SerializeField]
private float min;
11 [SerializeField]
private float max;
14 public float Min {
get => min;
set => min = value; }
17 public float Max {
get => max;
set => max = value; }
23 public Range(
float min,
float max) {
41 public float Max {
get; }
44 public float Min {
get; }
RangeBoundsAttribute(float min, float max)
[SerializeField, RangeBounds(0, 999)] private Range distance = new Range(1, 999); ...
float Min
Lowest value a number can have in this range
Simple class to represent the high and low bounds for a float. It includes a picker to randomly choos...
float Min
Used by RangeDrawer exclusively
Used for Range variable in the Unity Editor to set the maximum bounds they can be set to ...
Range(float min, float max)
Constructor used to set the range directly or as initialisation for MonoBehaviour data ...
Range()
Default constructor used when the range is set in a MonoBehaviour in the Unity Editor ...
float Max
Highest value a number can have in this range
float Pick()
Choose a random number within the inclusive range
Interface so that code can use a picker without know more about the source. A picker returns a value ...
float Max
Used by RangeDrawer exclusively