Slider
Now let's add a volume slider for the user to move and select his/her volume level.
A slider template is available, enabling you to adjust parameters easily by sliding a thumb along a bar. Perform the following steps to create a volume slider:
Select the Panel GameObject and create a new child with Alt + Shift + N.
Rename that new child as
Volume
. It will be our volume settings container.Navigate to NGUI | Open | Widget Wizard and perform the following steps:
Select the Slider template.
Set the Dark Sprite to Empty.
Set the Light Sprite to Full.
Set Highlight to Thumb.
With the Volume GameObject selected, click on the Add To button.
Parameters
A slider has been created. It has 6 parameters as follows:
Value: This is the slider's current value, which is between 0 and 1.
Steps: This is the number of steps to completely fill or empty the slider.
Direction: This is the slider's fill direction, either Horizontal or Vertical.
Foreground: This is the sprite used to fill the slider.
Thumb: This is...