Unity Native Audio
Unity audio components which Sonity has support for
Sonity is built around the native audio system in Unity. So everything that Unity audio supports Sonity also supports.
You can use built in features like:
Settings for your audio data.
๐ก TIP - AudioClip Settings Music and longer sounds should probably be set to streaming as to use less memory. If you have problems with e.g. stuttering audio, try changing the Load Type of the AudioClips. Read more on: How To - Optimize AudioClip Settings.
For channel based effects like reverb sends, compression, ducking etc. Contains AudioMixerGroups, which SoundContainers and SoundEvents can be assigned to output into.
Can also expose parameters to enable real time editing of e.g. volume and reverb effects (see for example TemplateSoundVolumeManager).
๐ก TIP - AudioMixer Performance Tips If you have issues with audio performance you might want to make sure youโre not using an unnecessary amount of AudioMixerGroups (like a hundred of them). Because changing AudioMixerGroup for a Voice uses performance (when playing a new Voice Sonity tries to find an unused Voice which uses the same AudioMixerGroup). Use AudioMixerGroups when you want effects per group or e.g. ducking or for larger groups of sounds, but maybe not a have a unique one for each sound.
For switching between different effect settings in the Audio Mixer.
For reverb with different settings in different zones.
For global settings of the audio like Buffer Size (latency), Speaker Mode (5.1, surround etc) and Spatializer Plugin (VR, vertical spatialization, steam audio, oculus/meta spatializer etc).
๐ก TIP - Audio Buffer Size & Voice Count If you experience audio performance problems/stutter/dropouts you might want to raise your DSP Buffer Size to Good Latency or Best Performance. And maybe lower the number of voices your project is allocated. 32 Real Voices should be sufficient for most games and you really never need to go above 64 Real Voices in my experience.
Need to be placed in the scene for audio to be heard. Is usually placed on the main camera or player.
Last updated