Logic & UI
Audio
Importing sounds, placing audio sources in the world, and reverb.
Getting sounds in
Import .wav, .ogg, .mp3 or .flac files.
Select a clip in the Project panel to hear it and see its waveform in the Inspector.
Audio sources
Right-click the Hierarchy, then Audio Source. The new emitter is silent; in the Inspector, under Audio Source, pick a clip and set:
| Field | Meaning |
|---|---|
| Gain | volume (0 is silent, 1 is full) |
| Pitch | playback speed |
| AttMin / AttMax | the distance where it starts to fade, and where it can't be heard any more |
| Loop | repeat forever |
| Preview | audition it while editing |
Sources are positioned in 3D and heard from the player camera. As a scene line:
-AudioSource:<clipUuid>,gain,attenuationMin,attenuationMax[,loop]The scene needs AudioSystem in its update: list, placed after MoveByVelocity, so that
moving sources are heard where they are now.
Reverb zones
-ReverbZone:radius[,rt60,wet,predelayMs] gives an area its own echo: caves, halls,
bathrooms.
Impact sounds (2D)
The ImpactAudio2D system plays a sound when 2D physics bodies collide hard enough.
Configure it with an ImpactAudio2D config block, and list it after Physics2DStep.