A slider which supports both X and Y values within a box
1 Overview
3 Methods
4 Usage
6 See also
The Box Slider (like the Unity Slider controls), allows you to set a value using a handle within the RectTransform of the control. However, it supports both the X and Y axis within the area.
It allows you to set a minimum and maximum value for the axis as well as separate X and Y value selectors.
Like the Slider, it also includes an OnValueChanged event which updates as the handle is moved by the user.
The properties of the Box Slider control are as follows:
Property | Description |
---|---|
Handle Rect | The Rect Transform of the child handle, position used to derive values for control |
Min Value | The minimum value for the sliders |
Max Value | The maximum value for the sliders |
Whole Numbers | Only use whole numbers instead of floats |
Value X | The X value of the slider |
Value Y | The Y value of the slider |
On Value Changed (event) | The Event fired when the handle within the box slider is changed |
Simply add the default BoxSlider to the scene using “UI / Extensions / Box Slider” in the Editor “GameObject” menu.
It is also available as a Game Component menu in “UI / Extensions / Box Slider”. However, you will need to manually set the Handle reference.
Also, check out the ColorSlider which implements this control
Credit judah4
Sourced from - http://forum.unity3d.com/threads/color-picker.267043/