Min/max Range Attribute
A bounded (i.e., with a minimum and maximum) range attribute for Unity's Vector2 and Vector2Int fields.
by Lazy Squirrel Labs
Price History +
A bounded (i.e., with a minimum and maximum) range attribute for Unity's Vector2 and Vector2Int fields that draws fields as min/max range sliders, easing the definition of bounded ranges on the inspector.
Features
- Intuitive, compact inspector representation.
- Support for Unity's Vector2 and Vector2Int types.
- Easy to use: just add the attribute to a serialized field of a supported type.
- Custom floating-point decimal places (0 to 3).
- Error prevention. Unlike using separate fields for minimum and maximum, value integrity is guaranteed (e.g., the minimum will never be greater than the maximum) by the inspector.
- Uses built-in Unity's EditorGUILayout.MinMaxSlider under the hood.