Slider
Add a slider to your User Interface (UI).
Read time 1 minuteLast updated 2 days ago
Use the Slider element to create a slider control that users can drag to select a value from a range in your User Interface (UI). This is useful for settings like volume control, brightness adjustment, or any other adjustable parameter. You can also use sliders to create progress bars that indicate the completion status of a task.
Slider properties
The following properties are available for you to customize in the slider's Inspector panel:Property | Description |
|---|---|
| Interactable | Enable to allow the user to interact with the slider. Disable to prevent interaction, which means the slider doesn't respond to user input. |
| Fill Rect | Assign an object that contains a RectTransform component (such as an Image) to visually represent the slider's fill area (the filled part of the slider). |
| Handle Rect | Assign an object that contains a RectTransform component (such as an Image) to visually represent the slider's handle. |
| Direction | Set the fill direction of the slider:
|
| Min Value | Set the minimum value of the slider. |
| Max Value | Set the maximum value of the slider. |
| Whole Numbers | Enable to restrict the slider to whole number values only. Disable to allow decimal values. |
| Value | Set the current value of the slider. |