SoundComponent
sSoundComponent
s have Base Volume
and Base Pitch
fields. These, among with any component-specific sound fields, influence the final volume of an AudioSource
.SoundComponent
has a list of AudioClip
s.AudioClip
is assigned a random AudioClip
will be played each time. Note that SoundComponent
s which play looped sounds - such as EngineRunningComponent
- will only use the first AudioClip
.AudioClip
s at runtime will not automatically change the current playing clip.AudioClip
in the Clips
list:soundComponent.Clip
AudioClip
in the Clips
list:soundComponent.Clips[i]
AudioSource
in the Sources
list:soundComponent.Source
AudioSource
in the Sources
list:soundComponent.Sources[i]
SoundComponent
:soundComponent.Enable(); soundComponent.Disable();
GetVolume
, SetVolume
, GetPitch
and SetPitch
instead of getting and setting the values directly from AudioSource
. This ensures that the master settings are applied to the values.