AudioManager Methods |
The AudioManager type exposes the following members.
| Name | Description | |
|---|---|---|
| CreateGroup | Create a new AudioSource for a sound group. | |
| GetAllGroups | Returns all AudioSources. | |
| GetGroup | Get the AudioSource for a group. | |
| GetOrCreateGroup | Get the AudioSource for a group and create a new one for it if it doesn't exist. | |
| Initialize | Initializes the manager and creates audio groups for general sounds, UI and music. | |
| LoadGroupVolume | Returns the volume saved in the settings for a group. | |
| PauseMusic | Pause the background music. | |
| Play(AudioSource) | Spawn an AudioSource and pool it after the sound ends. | |
| Play(String, AudioClip) | Play an audio with a group's AudioSource. Create the group if it doesn't exist. | |
| Play(AudioSource, Vector3) | Spawn an AudioSource and pool it after the sound ends. | |
| Play(AudioClip, Boolean, Boolean) | Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping). | |
| Play(AudioSource, Transform, Boolean) | Spawn an AudioSource and pool it after the sound ends. | |
| Play(AudioSource, Transform, Vector3) | Spawn an AudioSource and pool it after the sound ends. | |
| Play(AudioClip, Transform, Boolean, Boolean) | Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping). | |
| Play(AudioClip, Vector3, Boolean, Boolean) | Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping). | |
| Play(AudioClip, Transform, Vector3, Boolean, Boolean) | Play an audio with a dedicated AudioSource and destroy it after it ends (if it's not looping). | |
| PlayMusic | Play the background music. | |
| PlayMusic(AudioClip) | Set and play background music. | |
| PlaySound(IReadOnlyListAudioClip) | Play a random audio from a list. | |
| PlaySound(AudioClip) | Play an audio with the general sounds group. | |
| PlayUI | Play an audio with the UI sounds group. | |
| RemoveGroup | Destroy the AudioSource for a group. | |
| SaveGroupVolume(String) | Saves the current volume of a group in settings. | |
| SaveGroupVolume(String, Single) | Saves the volume of a group in settings. | |
| StopMusic | Stop the background music. |