Game Dev Cheat Sheet

Unity Audio Import Settings Reference

Recommended import settings for every type of audio in your Unity project.

Unity audio import settings have a huge impact on memory, load times, and sound quality. The defaults are rarely optimal. This reference gives you the exact Load Type, Compression Format, Sample Rate, and other settings for each category of audio, with explanations of why each choice matters.

Select audio asset
Inspector
Audio Import Settings

Background Music

2 to 5 minutes2 to 8 MB (compressed)

Long-playing tracks that loop in the background. Typically 2 to 5 minutes, the largest audio files in your project.

Examples: Menu theme, level music, boss fight music, credits

Load Type

Streaming

Compression

Vorbis (70%)

Force to Mono

No

Import Settings (Detailed)

Load TypeStreaming

Music files are large. Streaming reads from disk in small chunks, using almost no RAM. This is critical on mobile where memory is limited.

Compression FormatVorbis @ 70%

Best quality-to-size ratio for long audio. Vorbis decoding is lightweight enough for streaming.

Sample RateOptimize Sample Rate

Unity analyses the clip and picks the lowest sample rate that preserves audible quality. Saves memory with no perceptible loss for music.

Preload Audio DataNo

Streaming handles loading on demand. Preloading a music track would defeat the purpose of streaming.

Load In BackgroundYes

Prevents hitches when starting playback. The first few frames of audio are buffered in a background thread.

Force To MonoNo

Music is typically stereo. Forcing to mono would destroy the mix.

Source File Formats

.oggrecommendedBest compression ratio for music. Vorbis codec, no licensing fees.
.mp3acceptableWidely compatible. Slightly worse quality than Ogg at same bitrate. Licensing is technically required for commercial use.
.wavavoidUncompressed. A 3 minute stereo track at 44.1 kHz is ~30 MB. Never ship uncompressed music.
.flacacceptableLossless. Use as a source format, but Unity will re-encode to Vorbis anyway.
.aiffavoidSame as WAV: uncompressed and large. No benefit over WAV.

Platform Overrides

MobileVorbis @ 50%Lower quality saves bandwidth and storage. Most mobile speakers and earbuds do not resolve the difference between 50% and 70%.
WebGLVorbis @ 50%Smaller download size. WebGL games need to minimise initial load.

Tips

  • *Use 44.1 kHz stereo as your source. Do not upsample to 48 kHz; it just wastes space.
  • *Loop points: set them in your DAW, not in Unity. Export with a clean loop.
  • *For crossfading between tracks, have two AudioSources and fade between them.
  • *On mobile, one streaming music track and one streaming ambience track is the safe limit. More can cause disk IO contention.

Unity C# Import Script

// Recommended import settings for: Background Music
// Examples: Menu theme, level music, boss fight music, credits

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.Streaming;
settings.compressionFormat = AudioCompressionFormat.Vorbis;
settings.quality = 0.70f; // 0 to 1
settings.sampleRateSetting = AudioSampleRateSetting.OptimizeSampleRate;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = false;
importer.loadInBackground = true;
importer.forceToMono = false;
importer.ambisonic = false;

importer.SaveAndReimport();

Ambient Loops

30 seconds to 3 minutes1 to 4 MB (compressed)

Environmental background sounds that loop seamlessly. Similar to music but often mono or with spatial positioning.

Examples: Forest ambience, rain, wind, underwater hum, city traffic, campfire

Load Type

Streaming

Compression

Vorbis (50%)

Force to Mono

Yes

Import Settings (Detailed)

Load TypeStreaming

Ambient loops are long and often play continuously. Streaming keeps RAM usage near zero.

Compression FormatVorbis @ 50%

Good quality at low bitrate. Ambient sounds are forgiving of compression artefacts.

Sample RateOptimize Sample Rate

Ambient sounds rarely have high-frequency content that needs preserving.

Preload Audio DataNo

Streaming does not benefit from preloading.

Load In BackgroundYes

Avoids frame hitches when entering a new area and starting ambient audio.

Force To MonoYes

Ambient sounds are often placed in 3D space. Mono is required for proper spatial audio. Halves the file size.

Source File Formats

.oggrecommendedGood compression for long ambient loops.
.wavavoidToo large for ambient loops that may be several minutes long.
.mp3acceptableWorks but Ogg is preferred for seamless looping (MP3 adds silence at start/end).
.flacacceptableGood source format. Unity re-encodes.
.aiffavoidUncompressed, no advantage.

Tips

  • *Make loops longer than you think you need. Short loops become noticeable quickly. 30+ seconds minimum.
  • *Layer 2 to 3 ambient sources with different loop lengths to avoid repetition.
  • *Use Audio Mixer snapshots to crossfade ambient zones.
  • *MP3 adds encoder padding, making seamless looping unreliable. Use Ogg for loops.

Unity C# Import Script

// Recommended import settings for: Ambient Loops
// Examples: Forest ambience, rain, wind, underwater hum, city traffic, campfire

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.Streaming;
settings.compressionFormat = AudioCompressionFormat.Vorbis;
settings.quality = 0.50f; // 0 to 1
settings.sampleRateSetting = AudioSampleRateSetting.OptimizeSampleRate;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = false;
importer.loadInBackground = true;
importer.forceToMono = true;
importer.ambisonic = false;

importer.SaveAndReimport();

Sound Effects

0.1 to 2 seconds10 to 200 KB (compressed)

Short, triggered sounds. The most common audio type. Must play instantly with no latency.

Examples: Explosion, sword swing, coin pickup, door open, hit impact, magic spell

Load Type

Decompress On Load

Compression

ADPCM

Force to Mono

Yes

Import Settings (Detailed)

Load TypeDecompress On Load

SFX must play instantly. Decompressing on load means zero CPU cost at playback time. RAM cost is acceptable because SFX are short.

Compression FormatADPCM

ADPCM is 3.5x smaller than PCM with near-instant decompression. Perfect for short, frequent sounds. Minimal quality loss on percussive/transient content.

Sample RatePreserve Sample Rate

SFX often have sharp transients that sound worse when downsampled. Keep the original rate (usually 44.1 kHz or 48 kHz).

Preload Audio DataYes

SFX need to be ready immediately. Preloading ensures the clip is in memory when you call AudioSource.Play().

Load In BackgroundNo

SFX are small and load fast. Loading in the foreground guarantees the clip is available on the frame it is needed.

Force To MonoYes

Most SFX are positional (3D). Mono is required for Unity's spatial audio. Halves RAM usage. Stereo SFX sound wrong when spatialized.

Source File Formats

.wavrecommendedUncompressed source gives Unity full control over compression. Best for short SFX.
.oggacceptableAlready compressed. Unity may re-encode, introducing double compression artefacts.
.mp3avoidDouble compression if Unity re-encodes. MP3 adds latency padding.
.aiffacceptableUncompressed like WAV. No practical difference.
.flacacceptableLossless source. Unity decodes and re-encodes.

Platform Overrides

MobileADPCMADPCM is the best balance of speed and size for mobile SFX.
SwitchADPCMSwitch has limited RAM. ADPCM keeps SFX small while staying fast to decompress.

Tips

  • *Keep SFX under 2 seconds. Longer SFX should use Compressed In Memory instead.
  • *Trim silence from the start and end in your DAW. Even 50ms of silence adds latency.
  • *For rapidly repeating SFX (gunfire), use AudioSource.PlayOneShot() to avoid cutting off the previous instance.
  • *Normalise peaks to -1 dBFS in your DAW. Let the game mixer handle volume.
  • *For very frequently played SFX (footsteps, gunfire), consider using PCM instead of ADPCM to reduce CPU.

Unity C# Import Script

// Recommended import settings for: Sound Effects
// Examples: Explosion, sword swing, coin pickup, door open, hit impact, magic spell

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.DecompressOnLoad;
settings.compressionFormat = AudioCompressionFormat.ADPCM;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = true;
importer.loadInBackground = false;
importer.forceToMono = true;
importer.ambisonic = false;

importer.SaveAndReimport();

UI Sounds

0.05 to 0.3 seconds1 to 20 KB

Interface feedback sounds. Must be extremely responsive with zero perceivable delay.

Examples: Button click, hover, menu open/close, notification, error beep, tab switch, slider tick

Load Type

Decompress On Load

Compression

PCM

Force to Mono

Yes

Import Settings (Detailed)

Load TypeDecompress On Load

UI sounds must play with absolute minimum latency. Decompressed and in RAM, ready to go.

Compression FormatPCM

PCM has zero decompression cost. UI sounds are so short (under 0.5s) that the RAM difference between PCM and ADPCM is negligible. PCM guarantees the lowest possible playback latency.

Sample Rate22050 Hz

Most UI sounds are simple clicks and beeps with no high-frequency content. 22.05 kHz halves the memory cost with no audible difference.

Preload Audio DataYes

Must be instantly available. UI is loaded at scene start and stays in memory.

Load In BackgroundNo

UI sounds are tiny. No reason to load in background; just load them immediately.

Force To MonoYes

UI sounds are non-spatial. Mono saves memory and there is no stereo benefit for a button click.

Source File Formats

.wavrecommendedUncompressed source. UI sounds are tiny, so file size does not matter.
.oggacceptableFine for UI, but the files are so small that compression saves almost nothing.
.mp3avoidAdds startup latency from decoder padding. Noticeable on quick UI interactions.
.aiffacceptableSame as WAV.
.flacacceptableLossless, Unity decodes.

Tips

  • *Keep UI sounds under 0.3 seconds. Shorter is better for responsiveness.
  • *Group all UI sounds in a dedicated Audio Mixer group with a separate volume slider.
  • *Use PlayOneShot for rapid interactions (e.g. scrolling a list quickly).
  • *Do not spatialize UI sounds. Keep them 2D.
  • *A subtle pitch variation (0.95 to 1.05) on repeated UI sounds prevents fatigue.

Unity C# Import Script

// Recommended import settings for: UI Sounds
// Examples: Button click, hover, menu open/close, notification, error beep, tab switch, slider tick

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.DecompressOnLoad;
settings.compressionFormat = AudioCompressionFormat.PCM;
settings.sampleRateOverride = 22050u;
settings.sampleRateSetting = AudioSampleRateSetting.OverrideSampleRate;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = true;
importer.loadInBackground = false;
importer.forceToMono = true;
importer.ambisonic = false;

importer.SaveAndReimport();

Voice and Dialogue

1 to 15 seconds per line20 to 200 KB per line (compressed)

Character dialogue, narration, barks. Often large in total volume but played one at a time.

Examples: NPC dialogue, narrator, cutscene speech, player barks, tutorial voice

Load Type

Compressed In Memory

Compression

Vorbis (50%)

Force to Mono

Yes

Import Settings (Detailed)

Load TypeCompressed In Memory

Dialogue is mid-length (2 to 15 seconds). Streaming adds latency; decompress on load uses too much RAM for many clips. Compressed in memory is the sweet spot: low RAM, decoded on the fly.

Compression FormatVorbis @ 50%

Vorbis at 40 to 60% quality sounds excellent for speech. Real-time decoding cost is minimal for a single voice stream.

Sample Rate22050 Hz

Human speech has very little content above 10 kHz. 22.05 kHz captures everything you need and halves the data.

Preload Audio DataYes

Dialogue should start playing immediately when triggered. Preload the clip.

Load In BackgroundYes

If you have many dialogue clips in a scene, loading them all in the foreground would cause a long load. Background loading spreads the cost.

Force To MonoYes

Dialogue is almost always mono. If you need stereo narration, set this to false, but 99% of game dialogue is mono and spatialised to the speaking character.

Source File Formats

.oggrecommendedVorbis handles speech extremely well at low bitrates.
.wavavoidDialogue files add up fast. A game with 1000 lines at 5 seconds each = ~500 MB uncompressed.
.mp3acceptableWorks fine for speech. Compression artefacts less noticeable on voice than music.
.flacacceptableGood archival format, but ship as Ogg.
.aiffavoidSame problem as WAV: too large for dialogue libraries.

Tips

  • *Use an addressable or asset bundle system to load dialogue on demand rather than including every line in the scene.
  • *Set a dedicated Audio Mixer group for dialogue with ducking on music/SFX when dialogue plays.
  • *For subtitle sync, bake timing metadata into your dialogue system, not into the audio clip.
  • *Normalise all dialogue to the same LUFS (-16 LUFS is common for games) in your DAW.

Unity C# Import Script

// Recommended import settings for: Voice and Dialogue
// Examples: NPC dialogue, narrator, cutscene speech, player barks, tutorial voice

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.CompressedInMemory;
settings.compressionFormat = AudioCompressionFormat.Vorbis;
settings.quality = 0.50f; // 0 to 1
settings.sampleRateOverride = 22050u;
settings.sampleRateSetting = AudioSampleRateSetting.OverrideSampleRate;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = true;
importer.loadInBackground = true;
importer.forceToMono = true;
importer.ambisonic = false;

importer.SaveAndReimport();

Footsteps

0.1 to 0.3 seconds5 to 30 KB per clip

Very frequent, very short. Played every frame of movement. Must be lightweight and varied.

Examples: Walking on grass/stone/wood/metal/water/gravel, running, landing

Load Type

Decompress On Load

Compression

ADPCM

Force to Mono

Yes

Import Settings (Detailed)

Load TypeDecompress On Load

Footsteps are played extremely frequently. They must decompress with zero CPU cost at playback time.

Compression FormatADPCM

3.5x smaller than PCM. Footsteps are percussive and handle ADPCM compression well. Decompression is nearly instant.

Sample RatePreserve Sample Rate

Footsteps have sharp transients. Downsampling can make them sound dull.

Preload Audio DataYes

Must be in memory before gameplay starts. A footstep that loads late sounds broken.

Load In BackgroundNo

Small files, fast to load. No need for background loading.

Force To MonoYes

Footsteps are always 3D positioned at the character's feet. Must be mono for spatial audio.

Source File Formats

.wavrecommendedShort clips. Uncompressed source gives best quality for the small file size.
.oggacceptableFine, but savings are minimal on sub-0.5s clips.
.mp3avoidAdds latency padding. Footsteps must sync precisely with animation.
.aiffacceptableSame as WAV.
.flacacceptableLossless, Unity decodes.

Tips

  • *Record or source 4 to 6 variations per surface type. Randomly select on each step to avoid machine-gun repetition.
  • *Add subtle random pitch variation (0.9 to 1.1) for more natural feel.
  • *Trigger footsteps from animation events, not from timers. Keeps them synced with the walk cycle.
  • *Group by surface: Footstep_Grass_01 to 06, Footstep_Stone_01 to 06, etc.
  • *Keep each clip under 0.3 seconds. Trim aggressively.

Unity C# Import Script

// Recommended import settings for: Footsteps
// Examples: Walking on grass/stone/wood/metal/water/gravel, running, landing

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.DecompressOnLoad;
settings.compressionFormat = AudioCompressionFormat.ADPCM;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = true;
importer.loadInBackground = false;
importer.forceToMono = true;
importer.ambisonic = false;

importer.SaveAndReimport();

One-shot (Long)

2 to 15 seconds50 to 500 KB (compressed)

Longer one-off sounds that play once and are not tightly latency-sensitive.

Examples: Victory fanfare, death scream, cutscene stinger, level complete jingle, boss roar

Load Type

Compressed In Memory

Compression

Vorbis (70%)

Force to Mono

No

Import Settings (Detailed)

Load TypeCompressed In Memory

Too long for decompress-on-load (wastes RAM), too short for streaming (adds latency). Compressed in memory is ideal: stays small, decodes on the fly.

Compression FormatVorbis @ 70%

Vorbis gives the best quality-to-size ratio for clips over 2 seconds.

Sample RateOptimize Sample Rate

Unity picks the optimal rate. Fine for one-shots that do not need precise high-frequency detail.

Preload Audio DataYes

Should be ready when triggered. A delayed victory fanfare feels broken.

Load In BackgroundYes

If there are many potential one-shots in a level, background loading prevents them from blocking the main thread.

Force To MonoNo

Many one-shots (fanfares, stingers) are designed in stereo. Keep stereo unless the sound is 3D positioned.

Source File Formats

.oggrecommendedGood compression for 3 to 15 second clips.
.wavacceptableFine if you have headroom. 10 seconds stereo = ~1.7 MB uncompressed.
.mp3acceptableWorks for one-shots since startup padding is less noticeable on longer clips.
.flacacceptableLossless source.
.aiffacceptableSame as WAV.

Tips

  • *For 3D positioned one-shots (boss roar from a specific location), use mono and enable spatialisation.
  • *Use Audio Mixer ducking so a dramatic one-shot briefly lowers music volume.

Unity C# Import Script

// Recommended import settings for: One-shot (Long)
// Examples: Victory fanfare, death scream, cutscene stinger, level complete jingle, boss roar

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.CompressedInMemory;
settings.compressionFormat = AudioCompressionFormat.Vorbis;
settings.quality = 0.70f; // 0 to 1
settings.sampleRateSetting = AudioSampleRateSetting.OptimizeSampleRate;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = true;
importer.loadInBackground = true;
importer.forceToMono = false;
importer.ambisonic = false;

importer.SaveAndReimport();

Looping SFX

1 to 10 seconds20 to 200 KB (compressed)

Continuous sound effects that loop while active. Between SFX and ambience in character.

Examples: Engine hum, fire burning, electric buzz, waterfall, torch flame, conveyor belt

Load Type

Compressed In Memory

Compression

Vorbis (60%)

Force to Mono

Yes

Import Settings (Detailed)

Load TypeCompressed In Memory

Looping SFX are medium-length (1 to 10 seconds). Compressed in memory balances RAM and CPU: small footprint, decoded as needed.

Compression FormatVorbis @ 60%

Vorbis handles loops well. ADPCM can introduce artefacts at loop points for tonal/sustained content.

Sample RateOptimize Sample Rate

Most looping SFX (engine hum, fire) do not need full 44.1 kHz bandwidth.

Preload Audio DataYes

Looping SFX should start immediately when the object is activated.

Load In BackgroundNo

Usually few looping SFX in a scene. Foreground loading keeps them instantly available.

Force To MonoYes

Looping SFX are almost always 3D positioned (attached to an object in the world). Must be mono for spatial audio.

Source File Formats

.oggrecommendedClean loops without MP3 gap issues. Good compression for looping content.
.wavacceptableFine for short loops (under 2 seconds). Avoids any compression loop artefacts.
.mp3avoidMP3 encoder adds padding that creates audible gaps at loop points.
.flacacceptableLossless source.
.aiffacceptableSame as WAV.

Tips

  • *Make the loop seamless in your DAW. Use crossfade at the loop boundary.
  • *Keep loops short (1 to 5 seconds) to save memory. Longer loops are only needed for complex evolving sounds.
  • *Do not use MP3 for loops. The encoder padding creates an audible gap. Use Ogg.
  • *Use Audio Mixer distance attenuation curves to fade looping SFX naturally.

Unity C# Import Script

// Recommended import settings for: Looping SFX
// Examples: Engine hum, fire burning, electric buzz, waterfall, torch flame, conveyor belt

AudioImporter importer = AssetImporter.GetAtPath(path) as AudioImporter;

// Default settings
AudioImporterSampleSettings settings = importer.defaultSampleSettings;
settings.loadType = AudioClipLoadType.CompressedInMemory;
settings.compressionFormat = AudioCompressionFormat.Vorbis;
settings.quality = 0.60f; // 0 to 1
settings.sampleRateSetting = AudioSampleRateSetting.OptimizeSampleRate;
importer.defaultSampleSettings = settings;

importer.preloadAudioData = true;
importer.loadInBackground = false;
importer.forceToMono = true;
importer.ambisonic = false;

importer.SaveAndReimport();

File Format Comparison

Which format to use as your source file before Unity re-encodes it.

FormatCompressionLossyLoop SafeLicence Free
.wavWaveform Audio (WAV)None (PCM)NoYesYes
.oggOgg VorbisLossy (Vorbis)YesYesYes
.mp3MPEG Layer 3Lossy (MP3)YesNoNo
.aiffAudio Interchange (AIFF)None (PCM)NoYesYes
.flacFree Lossless Audio CodecLosslessNoYesYes

Quick Decision Guide

What kind of audio is it?

Short and frequent (under 2s)?

Decompress On Load + ADPCM + Mono. Covers SFX, footsteps, UI.

Medium length (2 to 15s)?

Compressed In Memory + Vorbis. Covers dialogue, one-shots, looping SFX.

Long and continuous (over 15s)?

Streaming + Vorbis. Covers music and ambient loops.

Needs absolute zero latency?

Decompress On Load + PCM. Only for critical UI sounds.

Frequently asked questions

Should I use Streaming, Decompress on Load, or Compressed in Memory?
Use Streaming for music and any clip longer than ~10 seconds: it streams from disk and uses very little RAM. Use Decompress On Load for short, low-latency SFX (gunshots, footsteps): tiny CPU cost, plays instantly. Use Compressed In Memory for medium-length clips you play often (UI, ambience).
Which compression format should I use for Unity audio?
Vorbis for music and most SFX: small file size, good quality. ADPCM for very short, frequent SFX where instant playback matters and CPU decoding cost should be near zero. PCM (uncompressed) only when you really need zero compression artefacts and the file is tiny.
What sample rate should I use for game audio?
44.1 kHz or 48 kHz for music. 22 kHz is usually fine for SFX, dialogue, and footsteps and halves the file size. Override sample rate per-clip in the Inspector under Override Sample Rate. Most players will not hear the difference on game SFX.
How do I make audio louder or quieter at runtime in Unity?
Use AudioMixer with exposed Volume parameters and call audioMixer.SetFloat("MusicVolume", Mathf.Log10(linear) * 20f). The log conversion is necessary because mixer volumes are in decibels but UI sliders are in linear 0-1.

Last updated: