Component to manage multiple AudioSources (or AudioClips) at the same time (or in the same component)
More...
|
AudioSource | PlayClip (AudioClip clip, float volume=1, bool loop=false, float pitch=1, float delay=0f, AudioMixerGroup audioMixerGroup=null) |
| Plays the clip. More...
|
|
List< AudioSource > | StopClip (AudioClip clipInAudioSource) |
| Stops playing the clip in all AudioSources related to this AudioSoundManager that are playing it. More...
|
|
AudioSource | GetAudioSource (int index) |
| Returns the AudioSource with the given index from the list of managed audio sources of this AudioSourceManager. More...
|
|
void | StopAllClips (bool fadeOut=false) |
| Stops playing all clips i all AudioSources related to this AudioSourceManager. More...
|
|
AudioSource | GetAudioSource (AudioClip clipInAudioSource) |
| Returns an AudioSource that is playing the given clip. More...
|
|
List< AudioSource > | GetAudioSources (AudioClip clipInAudioSource) |
| Returns all AudioSources that are playing the given clip. More...
|
|
Component to manage multiple AudioSources (or AudioClips) at the same time (or in the same component)
Definition at line 10 of file AudioSourceManager.cs.
◆ AddAudioSource()
AudioSource UnityEngine.AudioSourceManager.AddAudioSource |
( |
| ) |
|
|
private |
◆ Awake()
void UnityEngine.AudioSourceManager.Awake |
( |
| ) |
|
|
private |
◆ ConfigureAudioSource()
AudioSource UnityEngine.AudioSourceManager.ConfigureAudioSource |
( |
AudioSource |
audioSource, |
|
|
AudioClip |
clip, |
|
|
float |
volume = 1 , |
|
|
bool |
loop = false , |
|
|
float |
pitch = 1 , |
|
|
AudioMixerGroup |
audioMixerGroup = null |
|
) |
| |
|
private |
◆ FadeOutAudioSource()
void UnityEngine.AudioSourceManager.FadeOutAudioSource |
( |
AudioSource |
audioSource | ) |
|
|
private |
◆ GetAudioSource() [1/2]
AudioSource UnityEngine.AudioSourceManager.GetAudioSource |
( |
AudioClip |
clipInAudioSource | ) |
|
Returns an AudioSource that is playing the given clip.
- Parameters
-
clipInAudioSource | The clip that must be playing the returned AudioSource. |
- Returns
Definition at line 89 of file AudioSourceManager.cs.
◆ GetAudioSource() [2/2]
AudioSource UnityEngine.AudioSourceManager.GetAudioSource |
( |
int |
index | ) |
|
Returns the AudioSource with the given index from the list of managed audio sources of this AudioSourceManager.
- Parameters
-
index | The index of the AudioSource |
- Returns
Definition at line 60 of file AudioSourceManager.cs.
◆ GetAudioSources()
List<AudioSource> UnityEngine.AudioSourceManager.GetAudioSources |
( |
AudioClip |
clipInAudioSource | ) |
|
Returns all AudioSources that are playing the given clip.
- Parameters
-
clipInAudioSource | The clip that all returned AudioSources must be playing. |
- Returns
Definition at line 109 of file AudioSourceManager.cs.
◆ GetFreeAudioSource()
AudioSource UnityEngine.AudioSourceManager.GetFreeAudioSource |
( |
| ) |
|
|
private |
◆ LowerVolumeAndStopSounds()
static IEnumerator UnityEngine.AudioSourceManager.LowerVolumeAndStopSounds |
( |
AudioSource |
audioSource | ) |
|
|
staticprivate |
◆ PlayClip()
AudioSource UnityEngine.AudioSourceManager.PlayClip |
( |
AudioClip |
clip, |
|
|
float |
volume = 1 , |
|
|
bool |
loop = false , |
|
|
float |
pitch = 1 , |
|
|
float |
delay = 0f , |
|
|
AudioMixerGroup |
audioMixerGroup = null |
|
) |
| |
Plays the clip.
- Parameters
-
clip | The AudioClip to play |
volume | The volume of the AudioSource playing the clip (0.0 to 1.0) |
loop | Loop the AudioClip? |
pitch | Pitch shift of the AudioSource |
delay | The volume of the AudioSource (0.0 to 1.0) |
audioMixerGroup | The target group to which the AudioSource should route its signal |
- Returns
Definition at line 26 of file AudioSourceManager.cs.
◆ StopAllClips()
void UnityEngine.AudioSourceManager.StopAllClips |
( |
bool |
fadeOut = false | ) |
|
◆ StopClip()
List<AudioSource> UnityEngine.AudioSourceManager.StopClip |
( |
AudioClip |
clipInAudioSource | ) |
|
Stops playing the clip in all AudioSources related to this AudioSoundManager that are playing it.
- Parameters
-
clipInAudioSource | The AudioClip that must stop playing. |
- Returns
Definition at line 44 of file AudioSourceManager.cs.
◆ audioSources
List<AudioSource> UnityEngine.AudioSourceManager.audioSources |
|
private |
◆ minimumQuantityOfExistingAudioSources
int UnityEngine.AudioSourceManager.minimumQuantityOfExistingAudioSources |
|
private |
The documentation for this class was generated from the following file: