Skip to content
Nicholas Ventimiglia edited this page Sep 11, 2015 · 1 revision

AudioManager

I have included a AudioManager in this library. The AudioManager extends Unity's audio system with audio layers. This will allow the players to fine tune audio volume by layer (music, sound, ect). The original purpose of this script was for UI audio and music. Simply put, I wanted my UI sounds to always propagate from an absolute location relative to the game AudioSource.

  • Audio2DListener : Attach to the main camera(s). Used to spawn audio sources for UI elements.
  • Audio2DSource : for global (ui) sounds. Use just like the AudioSource.
  • AudioRegulator : Attach to AudioSources to regulate audio volume by layers (music, ui, ect)
  • AudioManager : A Clr manager for mediating changes to layer volumes.

Use

  • Attach the Audio2DListener to the main camera(s).
  • Attach Audio2DSource where you would regularly play an AudioSource
  • Attach an AudioRegulator where you want the AudioSource to respect an audio layer
  • Attach the AudioManager somewhere and use it to control the audio layer volumes.
Clone this wiki locally