Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Video & audio

unity-audio

Unity 6 audio system guide. Use when working with sound effects, music, AudioSource, AudioClip, AudioListener, Audio Mixer, spatial audio, or audio optimization. Covers 3D sound, mixer groups, snapshots, and audio import settings. Based on Unity 6.3 LTS documentation.

Nice-Wolf-Studio · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add Nice-Wolf-Studio/unity-claude-skills --skill unity-audio

About this skill


name: unity-audio description: > Unity 6 audio system guide. Use when working with sound effects, music, AudioSource, AudioClip, AudioListener, Audio Mixer, spatial audio, or audio optimization. Covers 3D sound, mixer groups, snapshots, and audio import settings. Based on Unity 6.3 LTS documentation.

Unity Audio System

Audio System Overview

Unity's audio system provides full 3D spatial sound, real-time mixing and mastering, hierarchies of mixers, snapshots, and predefined effects. The core architecture follows a source-listener model:

  1. AudioClip -- A container for audio data imported into the project
  2. AudioSource -- A component attached to a GameObject that plays AudioClips
  3. AudioListener -- A microphone-like component (typically on the Main Camera) that receives audio from sources and outputs to speakers
  4. Audio Mixer -- A central hub for mixing sources, applying effects, and mastering output

Sounds originate from AudioSources attached to objects and are picked up by the AudioListener. Unity calculates a source's distance and position from the listener to determine volume, panning, and 3D effects. The system also models the Doppler Effect using the relative speed of the source and listener objects.

Supported Audio Formats

FormatType
.aif, .wavUncompressed
.mp3, .oggCompressed
.xm, .mod, .it, .s3mTracker modules

Unity supports mono, stereo, and multichannel audio assets (up to eight channels).


AudioSource and AudioListener

AudioSource

The AudioSource component plays an AudioClip in your scene and provides options to customize playback behavior. Key properties:

PropertyDescriptionDefault
clipThe AudioClip to playNone
volumePlayback volume (0.0 to 1.0)1.0
pitchPlayback speed/pitch multiplier1.0
loopWhether the clip loops on completionfalse
playOnAwakeAuto-play when the GameObject activatestrue
spatialBlend2D (0.0) to 3D (1.0) blend0.0
prioritySource priority (0 = highest, 256 = lowest)128
muteMutes the source without stopping playbackfalse
outputAudioMixerGroupTarget mixer group for routingNone

3D Sound Settings

PropertyDescription
dopplerLevelDoppler effect intensity scale
spreadSpread angle in degrees for 3D stereo/multichannel
rolloffModeHow volume attenuates over distance (Logarithmic, Linear, Custom)
minDistanceDistance within which volume is at maximum
maxDistanceDistance beyond which sound is inaudible or stops attenuating
panStereoStereo panning position (-1 left to 1 right)
reverbZoneMixMix level into global reverb

AudioListener

The AudioListener acts as a microphone-like device that receives input from AudioSources in the scene and outputs through speakers. Critical rules:

  • Only one AudioListener per scene -- this is a hard constraint
  • Added to the Main Camera by default
  • Has no configurable Inspector properties -- it simply must be added to work
  • Processes both 3D positional audio and 2D audio (which ignores 3D processing)
  • Applies Reverb Zones and Audio Effects to all audible sounds

Static properties available via script:

  • AudioListener.volume -- Master volume (0.0 to 1.0)
  • AudioListener.pause -- Pauses/unpauses the entire audio system

AudioClip and Import Settings

Load Types

Load TypeBehaviorBest For
Decompress On LoadDecompresses immediately on load; uses ~10x memory for Vorbis, ~3.5x for ADPCMSmall, frequently-used sound effects
Compressed In MemoryKeeps compressed in memory, decompresses during playback; slight CPU overheadMedium sounds where decompress-on-load exceeds memory budget
StreamingDecodes on the fly from disk; uses ~200KB buffer per clipLong audio like music or ambient tracks

Compression Formats

FormatRatioBest For
PCM1:1 (uncompressed)Very short effects requiring zero CPU decode cost
ADPCM3.5:1Noise-heavy sounds (footsteps, impacts, weapons)
Vorbis/MP3Variable (quality slider)Music and medium-length effects

Import Settings

SettingDescription
Force To MonoMixes multi-channel audio down to a mono track before packing
NormalizeNormalizes audio during mono conversion
Load In BackgroundLoads the clip asynchronously to avoid blocking the main thread
AmbisonicMarks the file as containing Ambisonic-encoded soundfields (for XR/360)
Preload Audio DataPreloads clip data when the scene finishes loading (default: enabled)
QualityCompression quality slider for Vorbis/MP3 formats
Sample Rate SettingPreserve, Optimize (auto-adjust), or Override (manual reduction)

Audio Mixer

The Audio Mixer provides mixing, effects processing, and mastering for audio output. Every Audio Mixer asset contains a Master Group by default.

Core Concepts

  • Groups (Buses) -- Signal chains that control volume attenuation and pitch correction; organized hierarchically (e.g., Master/SFX/Weapons)
  • Snapshots -- Saved parameter configurations that can be transitioned between at runtime to create different moods or atmospheres
  • Effects -- DSP effects (reverb, echo, EQ, etc.) applied within group signal chains
  • Send/Return -- Passes the result from one bus to another for shared effects processing
  • Ducking -- Modifies one group's output based on activity in another (e.g., lower ambient when dialogue plays)
  • Views -- Different visibility configurations for managing complex mixer layouts
  • Exposed Parameters -- Mixer parameters exposed for scrip
Read the complete source ↗