Click or drag to resize

AudioManager Methods

The AudioManager type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCreateGroup
Create a new AudioSource for a sound group.
Public methodStatic memberGetAllGroups
Returns all AudioSources.
Public methodStatic memberGetGroup
Get the AudioSource for a group.
Public methodStatic memberGetOrCreateGroup
Get the AudioSource for a group and create a new one for it if it doesn't exist.
Public methodStatic memberInitialize
Initializes the manager and creates audio groups for general sounds, UI and music.
Public methodStatic memberLoadGroupVolume
Returns the volume saved in the settings for a group.
Public methodStatic memberPauseMusic
Pause the background music.
Public methodStatic memberPlay(AudioSource)
Spawn an AudioSource and pool it after the sound ends.
Public methodStatic memberPlay(String, AudioClip)
Play an audio with a group's AudioSource. Create the group if it doesn't exist.
Public methodStatic memberPlay(AudioSource, Vector3)
Spawn an AudioSource and pool it after the sound ends.
Public methodStatic memberPlay(AudioClip, Boolean, Boolean)
Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping).
Public methodStatic memberPlay(AudioSource, Transform, Boolean)
Spawn an AudioSource and pool it after the sound ends.
Public methodStatic memberPlay(AudioSource, Transform, Vector3)
Spawn an AudioSource and pool it after the sound ends.
Public methodStatic memberPlay(AudioClip, Transform, Boolean, Boolean)
Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping).
Public methodStatic memberPlay(AudioClip, Vector3, Boolean, Boolean)
Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping).
Public methodStatic memberPlay(AudioClip, Transform, Vector3, Boolean, Boolean)
Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping).
Public methodStatic memberPlayMusic
Play the background music.
Public methodStatic memberPlayMusic(AudioClip)
Set and play background music.
Public methodStatic memberPlaySound(IReadOnlyListAudioClip)
Play a random audio from a list.
Public methodStatic memberPlaySound(AudioClip)
Play an audio with the general sounds group.
Public methodStatic memberPlayUI
Play an audio with the UI sounds group.
Public methodStatic memberRemoveGroup
Destroy the AudioSource for a group.
Public methodStatic memberSaveGroupVolume(String)
Saves the current volume of a group in settings.
Public methodStatic memberSaveGroupVolume(String, Single)
Saves the volume of a group in settings.
Public methodStatic memberStopMusic
Stop the background music.
Top
See Also