ST Spatial Audio Source
Makes an Audio Source sound like it is really in the world. Players hear where it is, including above and behind them, and the room adds reflections and reverb to it. StageTime uses Meta XR Audio for this. Add it with Add Component → StageTime → ST Spatial Audio Source next to an Audio Source.
Set up the Audio Source as usual:
- Spatial Blend: 3D (1). A 2D Audio Source is not spatialized; the build warns about it.
- 3D Sound Settings: Min Distance, Max Distance and the rolloff curve still set how the volume falls with distance.
Without this component a 3D Audio Source still works, but only pans left and right.
| Field | |
|---|---|
spatialize | Head-related (HRTF) spatialization. Off = plain left/right panning. Default on |
gain | Extra gain in decibels on top of the Audio Source volume, 0 to 20 dB |
roomAcoustics | Add the room's early reflections and reverb to this sound. Default on |
reverbSend | How much of the sound goes to the room reverb, −60 to 20 dB. Lower it for a drier sound |
volumetricRadius | Size of the sound in metres. Above 0 the sound comes from an area (a big speaker, a waterfall, a video screen) rather than a point. Keep it smaller than how close players get |
Scripts can change the fields at any time. Like the Audio Source's own settings, changes apply only on the player's
device that runs the code; use [Synced] fields or network events to change them for everyone.
var spatial = GetComponent<STSpatialAudioSource>();
spatial.reverbSend = -20f; // drier
How world audio plays
- Every Audio Source in a world plays through the player's Music volume.
- World sounds never take priority over player voices. A Priority below 128 is raised to 128.
- Rooms are not baked. Sound does not go around or get blocked by walls (no occlusion), and the reverb is a general room sound rather than one shaped by your world's geometry.