Singleton Audio Manager - Unity C# 2018
Singleton scriptable object audio manager that can be called to spawn instant temporary audio sources for any sound effects or music that need to be played in your scene. It does not need to be attached to any game object and loads when your game loads.
Setup Tutorial
Part 1: https://www.youtube.com/watch?v=POM7Ath86pg
Part 2: https://www.youtube.com/watch?v=AlbAhrgcPv0
Dependent on YaSingleton library (Free in Unity Asset Store)
https://assetstore.unity.com/packages/tools/integration/yasingleton-116633A singleton class for controlling game audio by containing references to master, sound, and music mixers. In order for the class to work properly, you should create the singleton asset from the Assets/Singletons/AudioManager command at the top bar in unity. This will create the scriptable object as a resource in unity and you will only need one. It will load itself with the game as long as the yaSingleton (https://assetstore.unity.com/packages/tools/integration/yasingleton-116633) library is present in your project.
In addition, you should create mixers for Master, Sound, and Music Values. After that, expose the volume parameter of each mixer. The parameters should be titled MasterVolume, SoundVolume, and MusicVolume Respectively.
Modified by Christopher Navarre and rereleased under CC-BY 4.0 https://creativecommons.org/licenses/by/4.0/legalcode.
Please credit Chris' Tutorials @ https://www.youtube.com/c/ChrisTutorialsOnYT
Audio Manager Script based off Original Developed by Daniel Rodríguez (Seth Illgard) in April 2010 http://www.silentkraken.com under MIT License