How to do it...

To add volume control sliders to your scene, follow these steps:

  1. Create a new Unity 3D project.
  2. Import the provided Unity package, Volume, into your project.
  3. Open the Volume scene from Project panel folder, VolumeControl | _Scenes.
  4. Play the scene and walk toward the semitransparent green wall in the tunnel, using the W A S D keys (press Shift to run). You will be able to listen to:
    • A looping music soundtrack
    • Bells ringing
    • A robotic speech whenever the character collides with the wall
  5. In the Project panel, use the Create menu to add an Audio Mixer file. Rename this new file MainMixer.
  6. Double-click MainMixer to open the Audio Mixer panel.
  1. In the the Audio Mixer panel Groups section, highlight Master and click the + (plus) ...

Get Unity 2018 Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.