Getting Started
Package Types
Scene Setup
Custom Collision, Layers, and Tags
Key Differences from Standard Unity3D development
Economy
In Spatial you have the option to control the volume of separate audio categories to suite your own audio setup and preferences.
Inside Unity, this is achieved by using Audio Mixers. As a creator, all sounds you create in a space must be routed through an audio mixer in order for these audio settings to work.
Ultimately Spatial gives you full control of the audio you output to your space. Ears are sensitive and improperly configured audio has the potential to hurt players.
<aside> <img src="/icons/error_red.svg" alt="/icons/error_red.svg" width="40px" /> Failure to meet the following guidelines may result in your space being removed from the platform.
</aside>
Music | Background music. Diegetic music can be categorized as “ambience” if you feel it is appropriate. |
---|---|
Sound Effects | Miscellaneous sounds of “action”, typically lasting at most several seconds. Explosions, slam dunking, and laser beams are all sound effects. |
Dialogue | In-game characters/NPCs talking or narration. This does NOT control voice chat. |
Ambience | The sounds of the environment. Wind blowing and leaves rustling. |
Interface | Sounds from your UI. When you click a button and it makes a satisfying bloop. |
Master Volume
set to 0%
your space should not produce any sound.0db
. An average level of about -7db
is ideal.The Toolkit Starter Template will come with a simple audio mixer with all the required parameters already exposed.
For every AudioSource
or SpatialSFX
in your project you will need to assign a mixer group in the inspector. Opening the object selector will give you a nicely organized list of groups you can use. Just select the category you want and you are good to go!
Screen Recording 2023-10-27 at 9.02.49 AM.mov
<aside>
<img src="/icons/bug_gray.svg" alt="/icons/bug_gray.svg" width="40px" /> If you can’t find the mixers in the object picker make sure Unity is updated to at least 2021.3.21f1
</aside>
In the default group you have the option of routing sounds to the Master
group. This will bypass all audio sliders besides the Master Volume
. This could result in a certain sound playing much louder than is comfortable for a user depending on their Spatial and System audio settings.
<aside> <img src="/icons/volume-high_yellow.svg" alt="/icons/volume-high_yellow.svg" width="40px" /> Always route sounds to a specific category.
</aside>
The easiest way to create a custom mixer is to duplicate the Toolkit mixer and do your custom chaining as child groups to the default categories.
If you want to start from scratch or adapt an existing mixer you have you must expose and rename all of the proper volume
parameters. If you don’t expose the parameters properly you will be blocked from uploading.
masterVolume |
🚨 This should control the output volume of the entire mixer. AKA this should be the exposed volume parameter on the Master group. |
---|---|
musicVolume |
volume parameter of music |
soundEffectsVolume |
volume parameter of SFX |
dialogueVolume |
volume parameter of dialogue |
ambienceVolume |
volume parameter of ambience |
interfaceVolume |
volume parameter of interface |
Exposing these parameters links the users audio settings sliders to the volumes of the group you select.
Below is an example of exposing the masterVolume parameter on a brand new mixer. This needs to be repeated for each parameter.