Audio levels are managed by AudioManager singleton which is responsible for saving and loading audio volume into player prefs it requires a scriptable object with the channels default values.
SFXs (sound effects) are managed by SFX Manager which is responsible for reproducing SFX audio clips. SFX are reproduced using an instance of an AudioSource moved in a defined position.
Each SFX contains an AudioClip, Pitch and Spatial Blend. SFX can be obtained by an SFX_SO scriptable with the GetSFX method. SFX_SO.GetSFX will return an SFX with all the parameters setted up according to its serialized parameters.
Note
Here's a list of the serialized parameters:
- List Clips
- float StartingPitch
- float PitchVariation
- float SpatialBlend
Each SFX request is done by invoking the PlaySFX static action directly on SFXManager.PlaySFX(SFX, Vector3) .
AudioClip pooling works on AudioSource.IsPlaying rather than on gameObject.ActiveInHierarchy.