bool Slider { get; set; }

robot_2Generated
code_blocksInput

Description

The Slider property of the RangeAttribute class indicates whether a slider 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 a more intuitive and user-friendly way to adjust values within a 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 in the inspector.

Example

// Example of using RangeAttribute with Slider
public class MyComponent : Component
{
    [Range(0, 100, Slider = true)]
    public float Speed { get; set; }
}