New Scene, music keeps playing

Hi,

I was wondering if anyone knows how to fix this:

When a new scene loads in our game, the music (audio listener on the Main Camera) that was playing in the old scene resets, even when I’m loading the same scene with the same music. Is it possible to change this or am I going to have to find some other solution?

If you are reloading the object then it will reset.
Place in the music script:

DontDestroyOnLoad(YourSoundFileGameObject);

and it should be fine.

Thanks! But ehh… could you be a little bit more specific? I don’t really know what music script you’re talking about. I just use a Main Camera with a sound file attached (Audio Listener).

Sorry for the noobish questions, I’m trying really hard to become a little bit more professional :wink:

make a javascript file which is:

function Awake()
{
  DontDestroyOnLoad(this);
}

and drag and rop it onto the object containing your sound file.