SOUNDSCAPE

Unity Audio Manager

SoundScape is an audio management solution for the Unity Game Engine. 

Features:

  • Sound grouping for easy management

  • Audio Source pooling

  • Music blending and fading

  • Random clip trigger ( useful for footsteps etc )

  • Simple high level APIs

  • Triggering of 2D or 3D sounds at positions

  • Tracking of Audio Sources to transform positions

29d207569807783fb5021c30ad021f74.png

Setup

  • Download and Install the Unity Package

  • Create a new scene and add the SoundScape Instance. Tools > SoundScape > Create SoundScape Instance

  • Selected the ScapeScape object in the scene and create a new profile
     

Capture4.PNG
  • After creating a new profile, click View to start setting it up

  • Create some new Music groups ( more than 1 audio clip will cause the group to play randomly when triggered )

Capture2.PNG
  • Create some new Sound Effect groups ( more than 1 audio clip will cause the group to play randomly when triggered )

Capture1.PNG

Script APIs

SetVolumeLevel( EVolumeChannels channel ) 

Sets volume of the mixer channel

float GetVolumeLevel( EVolumeChannels channel ) 

Returns volume of the mixer channel

MuteChannel( EVolumeChannels channel , bool isMuted ) 

Mutes the mixer channel true/false

bool IsChannelMuted( EVolumeChannels channel ) 

Returns channel muted

SetAudioListenerFollowTargetTransform followTarget ) 

Sets the audio listener follow target ( Main Camera/Player for example )

PlayMusic( string soundGroup, float crossfadeTime, bool allowRetrigger ) 

Starts the playing of a music group with fade time.

If the music group is already playing and "allowRetrigger" is true, the music will restart, otherwise the call will be ignored.

FadeMusicOut( float fadeTime ) 

Fades the currently playing music out over fadeTime (Secs)

FadeGameSFXOut( float fadeTime, bool resetFadeOnActiveSceneChange ) 

Fades the mixer SFX channel out over fadeTime. If "resetFadeOnActiveSceneChange" is set to true, the SFX channel volume will be restored on scene changing.

AudioSource GetPlayingAudioSourceByClipName( string clipName ) 

returns the currently playing clip's Audio Source

GetAllPlayingAudioSourcesByClipName( string clipName, List<AudioSource> audioSources ) 

returns all currently playing clip Audio Sources

AudioSource PlaySFX( string groupName, float delay, Action onCompleteAction ) 

Plays a one shot SFX with a delay. OnCompleteAction is invoked with the clip has finished playing.

AudioSource PlaySFX( string groupName, Vector3 position, float delay, Action onCompleteAction ) 

Plays a one shot SFX with a delay at a position. OnCompleteAction is invoked with the clip has finished playing.

AudioSource PlaySFX( string groupName, Transform followTarget, float delay, Action onCompleteAction ) 

Plays a one shot SFX with a delay that will follow a transform. OnCompleteAction is invoked with the clip has finished playing.

AudioSource PlayLoopingSFX( string groupName, float delay, Action onCompleteAction ) 

Plays a looping SFX with a delay. OnCompleteAction is invoked with the clip has finished playing.

AudioSource PlayLoopingSFX( string groupName, Vector3 position, float delay, Action onCompleteAction ) 

Plays a looping SFX with a delay at a position. OnCompleteAction is invoked with the clip has finished playing.

AudioSource PlayLoopingSFX( string groupName, Transform followTarget, float delay, Action onCompleteAction ) 

Plays a looping SFX with a delay that will follow a transform. OnCompleteAction is invoked with the clip has finished playing.

StopAllLoopingAudio() 

Stops all looping audio sources

StopAllLoopingAudioByGroupName( string groupName ) 

Stops all looping audio sources by group name

StopAllLoopingAudioByClipName( string clipName ) 

Stops all looping audio sources by clip name

StopAllLoopingAudioByTrackedTransform( Transform followTarget ) 

Stops all looping audio sources by follow target

StopLoopingAudioByAudioSource( AudioSource source ) 

Stops looping audio source by source