I want to play a specific song while a level is playing, but so far I’ve only used audio.PlayOneShot(soundClip). How can I play a song multiple times until the level changes?
I want to play a specific song while a level is playing, but so
Share
As Bart pointed out, you can change the audio source’s loop property from the Inspector, but you can also do it from code.
When you first load a level, you play the clip and loop it, and when you change the level you stop the clip and disable it looping (actually not necessary).