bool Slider { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Slider property of the RangeAttribute class is a boolean value that determines whether a slider control should be used in the inspector for a property marked with this attribute. When set to true, the property will be represented as a slider, allowing for more intuitive and user-friendly value adjustments within the specified range.

Usage

To use the Slider property, apply the RangeAttribute to a float or integer property in your class. Set the Slider property to true to enable the slider control in the inspector.

Example

[Range(0, 100, Slider = true)]
public float Speed { get; set; }