A short guide for anyone getting music into Unity and finding its loop points don’t survive the trip.
You embedded loop points in a WAV, dropped it into Unity, ticked Loop on the AudioSource, and it ignored them completely. Then you searched, and half the internet told you Unity doesn’t support embedded loop points at all.
That’s the accepted answer nearly everywhere. It’s also wrong.
Unity does read them.
What’s actually happening
Loop points in a WAV live in a chunk called smpl, named that because it was originally for hardware samplers, and it’s been in the spec since the 90s. Unity reads it. Turn on looping and playback starts at the top of the file and then wraps inside your loop region instead of jumping back to zero, which is exactly what you were hoping for.
It’s just not documented. There’s nothing about it in the AudioSource docs, and as far as I can tell there never has been, which is most of the reason everyone has settled on “Unity ignores loop points” as the accepted answer.
Why it looks broken
Your importer ate them.
Unity’s default audio import re-encodes to Vorbis, and that re-encode doesn’t carry the smpl chunk through. Your loop points shift, or they’re gone, and the file that looped perfectly in your DAW now loops end to end like you never marked anything.
So the usual run of events is: set the loop points carefully, drag the file in, hit play, hear it ignore all of it, and conclude the feature doesn’t exist. Which is a completely fair conclusion from what you just saw. The markers were sitting in the file the whole time. Unity just never got to see them.
The fix, which is two dropdowns
Your source has to be a WAV. Not an OGG, not an MP3 you converted from one. The chunk only lives in the WAV.
Then, in the Inspector, either set Compression Format to PCM or set Load Type to Decompress On Load. Either one stops the re-encode that was eating your markers.
That’s it. That’s the whole thing.
One quirk worth knowing while you’re in there: the format allows more than one loop in the chunk, and Unity uses the first. So if your DAW wrote several, the rest are ignored, which is worth checking before you spend an afternoon wondering why it’s looping somewhere you didn’t ask for.
Whether you should lean on it
Depends how much the music matters to you.
For a menu bed or a bit of ambience, go ahead. It costs nothing and it works.
For anything you actually care about, I’d treat it as a convenience rather than something to build on. Nobody at Unity has documented it, which means nobody has promised to keep it. It survives at the mercy of an import setting a teammate can flip without knowing what it was for, and nothing about the result announces itself. The track just starts looping wrong and waits for someone to notice.
If you want it guaranteed, schedule the loop yourself against the DSP clock. That’s more work, but it’s work you control.
The problem underneath this one
Here’s the part that catches people right after they finally get their markers working.
If there’s any reverb or delay on your music, or the last note just rings, you’ll still hear the seam. At the loop end that decay is still sounding and it’s meant to carry on into whatever comes next. Instead the playhead jumps back, the tail is cut off mid-ring, and the dry attack of your loop start lands on top of the hole where your room used to be. It reads as a gap even though the samples are perfectly continuous.
No loop point fixes that, because it isn’t a loop point problem. It happens because one playhead wrapped. You either run two voices and hand off between them, so the old pass keeps ringing underneath the new one, or you fold the tail back into the head of the file so a plain loop is seamless on its own. The first is called tail overlap and the second a folded tail, and the FAQ explains when to use which.
I wrote both of those up properly, with what the other seven engines do, over here: How Game Engines Handle Loop Points in Audio Files
RPG Maker is the clearest case of the one-voice problem, because it loops natively but has no second voice to ring the tail over the restart: RPG Maker Loops Music Seamlessly Without a Plugin.
And Godot is the mirror image of this article, because it reads the exact same smpl chunk but documents the feature and ships it switched on by default: Godot Reads WAV Loop Points Out of the Box. Almost No Tutorial Mentions It.
And if you would rather hear the tail problem and its fix than imagine them: Hear the Loop plays a hard cut against a tail overlap right in your browser.
If you’re doing this more than once
Two dropdowns and one track is fine. It’s when it repeats that it wears on you.
The import settings only decide whether Unity reads your markers. You’ve still got to render the loop so the tail survives the wrap, and that’s a DAW job, not a checkbox. You’ve still got to actually hear the seam before you ship it, because a loop that looks right in a waveform can still click. And if the same track goes anywhere else, every engine wants it done differently: Godot reads the WAV chunk happily, Unreal won’t read it at all and needs cue markers instead, RPG Maker wants tags inside an OGG. Then the music gets revised, and you do the whole lot again.
The threads about this all end the same way: it loops in the editor, then the build has “a gap, pop, crack, or something in between”, or a compressed import quietly drops the loop points. That’s the part I built Loopsmith to take off your plate. You finish the music, and it does the setup.
- If you’re the composer, you don’t need to know any of this. You hand over an export folder that already works in Unity, so the developer doesn’t have to learn import settings or debug a loop that clicks.
- The import settings are done for you. Each export folder carries a small editor helper. Copy the folder into Assets, or pick your Unity project once and Loopsmith exports straight into Assets/Music, so there’s nothing to copy. As each clip imports, the helper sets Decompress On Load, PCM for WAV and Preserve Sample Rate. Nobody has to remember the two dropdowns, and a clip can’t quietly go back to the default.
- You drag in one object and press Play. The same helper builds a ready-made Music object named after your track. The intro plays once, the loop repeats with its tail ringing over every restart, and the ending is one call away. Repeats are scheduled with PlayScheduled on Unity’s audio clock, not counted in Update.
- You hear it the way the game will play it, before it’s anywhere near Unity: the restart with its tail, how the game will end the music, and a check that flags a click, a loudness jump or a cut-off sound at the loop point. If you already marked the loop in REAPER or Audacity, Loopsmith reads those markers.
- Revisions are a re-export. Export the revised track and Unity picks up the new files when you switch back. The helper brings the object up to date.
- It plays through your mixer. Every player has an Output slot for your Audio Mixer group and a Volume you can set or fade from code, so the music sits on your Music bus and drops under dialogue without anyone editing a generated script.
- It grows with the game. The same kind of export covers stems the game fades in and out, states it switches between by name, and the sections of a longer piece.
I test it in Unity 6. It’s Windows, and the demo is the full app with three free tracks you can export as often as you like, so you can point it at whichever track is annoying you right now and see if it helps.
Austin Haynes is a composer for games, including Cognition: An Erica Reed Thriller (AdventureGamers Best Music of 2013) and The Silver Lining. If your project needs music, you can hear his work at austinhaynesmusic.com.