User Tools

Sound Component

  • A base class for all SoundComponents
  • Inherits from VehicleComponent, therefore can be turned on or off, enabled or disabled or have LOD set.
Base Volume and Pitch
  • All SoundComponents have Base Volume and Base Pitch fields. These, among with any component-specific sound fields, influence the final volume of an AudioSource.
Clips list of SoundComponent
  • Each SoundComponent has a list of AudioClips.
  • If more than one AudioClip is assigned a random AudioClip will be played each time. Note that SoundComponents which play looped sounds - such as EngineRunningComponent - will only use the first AudioClip.
  • Changing AudioClips at runtime will not automatically change the current playing clip.


  • Get the first AudioClip in the Clips list:
  • Get i-th AudioClip in the Clips list:
  • Get the first AudioSource in the Sources list:
  • Get i-th AudioSource in the Sources list:
  • Enable / disable SoundComponent:
  • To get/set volume and pitch use 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.