Adding volume control with Audio Mixers
Sound volume adjustment can be a very important feature, especially if your game is a standalone. After all, it can be very frustrating to access the operational system volume control. In this recipe, we will use the new Audio Mixer feature to create independent volume controls for Music and Sound FX.
For this recipe, we have provided a Unity package named
Volume.unitypackage, containing an initial scene featuring soundtrack music and sound effects. The file is available inside the
How to do it...
To add volume control sliders to your scene, follow these steps:
Volume.unitypackageinto your project.
- Open the Volume scene (available in the Assets | Volume folder). Play the ...