Can I make an audio source play its clip starting at a time in the clip besides the beginning?

I have an audio source in each of my (relatively short) levels, and when I load my next level I’d like to start playing at the time the last level’s music stopped off. Is this doable? The Play() call takes a delay variable, but that looks more like it delays when it starts playing rather than making it start a few seconds into the clip.

There are ways around this, but it seemed like a weird thing to not be able to do. Otherwise I plan to push my audiosource into a singleton that lives longer than the level and hope it doesn’t get deleted at level load.

One way would be to have the source on a GameObject that is marked with “DontDestroyOnLoad”. Keep in mind that you need a listener to be able to hear it.

The second way is to use either AudioSource.time or AudioSource.timeSamples to get the current playback time and to reset it after scene load. timeSamples will give you the most accurate time but it’s not in seconds.