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:

FieldMeaning
Gainvolume (0 is silent, 1 is full)
Pitchplayback speed
AttMin / AttMaxthe distance where it starts to fade, and where it can't be heard any more
Looprepeat forever
Previewaudition it while editing

Sources are positioned in 3D and heard from the player camera. As a scene line:

tgscene
		-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.