O'Reilly logo

NGUI for Unity by Charles Bernardoff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. Select the Panel GameObject and create a new child with Alt + Shift + N.
  2. Rename that new child as Volume. It will be our volume settings container.
  3. Navigate to NGUI | Open | Widget Wizard and perform the following steps:
    1. Select the Slider template.
    2. Set the Dark Sprite to Empty.
    3. Set the Light Sprite to Full.
    4. Set Highlight to Thumb.
  4. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required