Sound
s&box has a full audio system including 2D/3D sound playback, voice chat, positional audio, an audio effects pipeline, and lip sync support.
s&box has a full audio system including 2D/3D sound playback, voice chat, positional audio, an audio effects pipeline, and lip sync support.
For music and programmatic audio streaming, see Audio.
Components
Audio components can be added to any GameObject in the editor. They handle everything from positional sounds and soundscapes to voice chat and lip sync.
| Component | Description |
|---|---|
SoundPointComponent | Plays a sound at a point in the world |
SoundBoxComponent | Plays a sound within a box area |
SoundscapeTrigger | Plays a soundscape when the listener enters the trigger area |
AudioListener | Overrides where the client hears audio from, instead of the camera |
LipSyncComponent | Drives morphs with lipsync from sounds |
VoiceComponent | Records and transmits microphone input to other players |
In This Section
- Playing Sounds โ
Sound.Play,SoundHandle,GameObject.PlaySound, and audio components
Referenced API
Canonical API pages mentioned in this guide.
If this exists and is enabled in a scene, then the client will hear from this point rather than from the cameras point of view.
Single source for creating sounds
Plays a sound within a box.
A handle to a sound that is currently playing. You can use this to control the sound's position, volume, pitch etc.
Plays a sound at a point in the world.
Plays a soundscape when the listener enters the trigger area.
Play this sound on this GameObject. The sound will follow the position of the GameObject. You'll be able to use GameObject.StopAllSounds to stop all sounds that are following this GameObject.
No summary available.