Unity Audio Files for VRChat Worlds
Unity imports source audio as an AudioClip, then encodes that clip for the selected build target. The source extension, runtime compression format, load type, and spatial-audio setup are separate decisions.
Select each AudioClip and configure it for its duration, playback frequency, and position in the world.
- Import a supported source file and inspect the resulting AudioClip.
- Set its load type and compression format for the way it will play.
- Add and test VRC Spatial Audio Source when the sound has a position in the world.
Add VRC_SpatialAudioSource to positioned world sounds. It adds a Unity Audio Source automatically and supplies VRChat's spatialization and falloff controls.
Formats Unity 2022.3 Imports
Unity 2022.3's built-in Audio Importer lists these file extensions:
| Source type | Extensions |
|---|---|
| Ogg Vorbis | .ogg |
| Audio Interchange File Format | .aif, .aiff |
| Free Lossless Audio Codec | .flac |
| Microsoft Wave | .wav |
| MPEG Layer 3 | .mp3 |
| Tracker modules | .mod, .it, .s3m, .xm |
Importing one of these files does not guarantee that Unity stores the original encoding in the build. For normal audio files, Unity re-encodes the imported clip for the build target according to the AudioClip's Compression Format and platform override settings.
Keep archival or editing masters outside the Unity project when they are not required by the build. Put only the source files used by the project under Assets.
Import an Audio File
Use either Unity import method:
- Drag the audio file into the Project window; or
- Select Assets > Import New Asset, choose the file, and select Import.
Select the imported AudioClip in the Project window to open its import settings in the Inspector.
AudioClip Settings That Matter
Force To Mono
Force To Mono mixes a multichannel source down to one channel before Unity packs it. Normalize applies peak normalization during that mono conversion.
Mono can be appropriate for a point source whose direction is produced by VRChat's spatializer. Do not force stereo music, ambisonic recordings, or other intentionally multichannel material to mono without listening to the result.
Load Type
| Load type | Unity behavior | Practical starting use |
|---|---|---|
| Decompress On Load | Decompresses the clip when it loads, reducing playback decoding work but increasing memory use. | Small, frequently played effects. |
| Compressed In Memory | Keeps the clip compressed in memory and decodes it during playback. | Medium clips where decompressed memory use is too high. |
| Streaming | Decodes continuous audio from a streaming buffer. | Long music, dialogue, or ambience that should not remain fully loaded. |
Unity warns that a Vorbis clip using Decompress On Load can use about ten times the memory of the compressed clip. Avoid that load type for large compressed files.
Every streaming AudioClip has its own streaming buffer, so do not set every sound to Streaming. Choose it for long clips and review the result in the Unity Profiler's Audio module.
Compression Format
Unity's AudioClip importer provides runtime formats including:
- PCM, which is uncompressed and has low decoding cost;
- ADPCM, which trades some CPU work for a fixed compression ratio;
- Vorbis/MP3, which offers stronger compression and a configurable Quality setting.
Unity recommends compressed formats for long audio such as music or dialogue. PCM or ADPCM can suit short effects, depending on their content and the acceptable memory cost.
The source extension does not make this choice for you. A WAV source can be encoded as Vorbis in the build, and an OGG source is re-encoded according to the AudioClip import settings.
Sample Rate Setting
For PCM and ADPCM clips, the importer can:
- Preserve Sample Rate;
- Optimize Sample Rate based on the clip's highest-frequency content;
- Override Sample Rate with a selected value.
Listen after changing the sample rate. Reducing it removes high-frequency content and may make speech, transients, or music sound dull.
Load In Background and Preload Audio Data
Load In Background delays loading to another thread so the clip does not block the main thread while loading.
When Preload Audio Data is disabled, code must load the clip's audio data before playback. Leave it enabled unless the world has an intentional loading system that handles the clip.
Starting Settings by Clip Type
These are inspection starting points, not universal presets:
| Clip | Check first | Verify in the world |
|---|---|---|
| Short UI or impact effect | Decompress On Load; PCM or ADPCM | Response time, memory use, repeated playback |
| Medium voice line | Compressed In Memory; Vorbis | Intelligibility, decoding cost, imported size |
| Long music track | Streaming; Vorbis | Loop point, streaming CPU, transitions |
| Long ambient bed | Streaming or Compressed In Memory | Simultaneous sources, loop seam, audible range |
| Positioned point source | Mono if appropriate; VRC Spatial Audio Source | Direction, Near/Far falloff, volume |
Always compare the Inspector's imported size with the source size and listen to the built result.
Configure VRChat Spatial Audio
For a sound that comes from a location:
- Select the GameObject that should emit the sound.
- Add VRC Spatial Audio Source.
- Assign the AudioClip on the Unity Audio Source component.
- Use the Scene-view gizmos to inspect Near, Far, and Volumetric Radius.
- Enter Play mode or run a VRChat local build and walk toward and away from the source.
VRChat documents its default world-audio falloff as roughly inverse-square. Far is where the sound reaches silence; Near is where volume begins to fall. VRChat recommends leaving Near at zero for realistic spatialization.
Use Volumetric Radius only when the sound should appear to come from a larger area. VRChat states that this value should remain lower than Far.
2D Audio
VRChat supports 2D audio, where volume does not change with the listener's position, but its documentation does not recommend it for normal world sources.
If a sound intentionally needs 2D playback:
- Disable Use Spatialized Audio on
VRC_SpatialAudioSource. - Set Spatial Blend on the Unity Audio Source to fully 2D.
- Test the result throughout the world.
Use positioned audio for objects, speakers, machinery, environmental features, and other sources that occupy a location.
Test Before Uploading
Check each important sound in a local VRChat build:
- the clip starts when expected;
- loop boundaries do not click or pause;
- positioned sounds fade over the intended distance;
- multiple nearby sources do not create excessive volume;
- compressed clips remain clear enough for their purpose;
- streaming clips do not produce audible stalls;
- the Unity Console has no audio import or build errors.
Use Window > Analysis > Profiler, then open the Audio module when memory or decoding cost needs investigation.
Troubleshooting
The imported clip is much larger in memory than expected.
Check Load Type and Compression Format. A compressed clip set to Decompress On Load expands in memory; use Compressed In Memory or Streaming when the clip is too large to keep decompressed.
The sound has no direction or distance falloff.
Confirm the GameObject has VRC Spatial Audio Source, spatialization is enabled, and the Unity Audio Source is not set to fully 2D. Inspect the Near and Far gizmos in the Scene view.
A loop clicks or pauses at its boundary.
Inspect the source edit for silence, discontinuity, or an inaccurate loop boundary. Re-export the loop, reimport it, and test the built clip because compression can expose a seam.
Force To Mono changed the sound too much.
Disable Force To Mono and compare the original channels. Stereo, phase-dependent, and spatially encoded recordings may not survive a mono mixdown cleanly.
A long track causes playback or loading problems.
Inspect its Load Type, Compression Format, Quality, and imported size. Test Streaming for long content, then use the Profiler's Audio module to review streaming and DSP CPU rather than changing every clip.
Official References
- Unity 2022.3: Built-in Importers
- Unity 2022.3: Audio Clip Import Settings
- Unity 2022.3: Audio Overview
- Unity 2022.3: Audio Profiler Module
- VRChat: VRC Spatial Audio Source