A simple knob radial control which operates like any other Knob you might find on a stereo or dial.
1 Overview
3 Methods
4 Usage
6 See also
A powerful Knob style control, complete with a multitude of options, such as:
The properties of the Scroll Rect Infinite component are as follows:
Property | Description |
---|---|
Direction | Direction of rotation CW - clockwise, CCW - counterClockwise. |
Max Value | Max value of the knob, maximum RAW output value knob can reach, overrides snap step, IF set to 0 or higher than loops, max value will be set by loops. |
Loops | SHow many rotations knob can do, if higher than max value, the latter will limit max value. |
Clamp Output 01 | Clamp output value between 0 and 1, useful with loops > 1. |
Snap To Position | snap to position?. |
Snap Steps Per Loop | Number of positions to snap. |
Parent Touch Mask | Parent touch area to extend the touch radius. |
Mask Background | Default background color of the touch mask. Defaults as transparent. |
Method | Arguments | Description |
---|---|---|
SetKnobValue | Angle (between 0 & 1), Loop number | Rotates the Knob control to the selected value and loop |
To use, simply add to the scene through the Menu option shown here: GameObject -> UI -> Extensions -> UI_Knob
Then apply any images / backgrounds or highlights you need for effect.
There is also a Unity event for when the value changes that you can hook your scripts in to. See the Demo Video for more details.
N/A
Tomasz Schelenz