Make music continue playing after a scene change.

I looked around for about 10 minutes so hopefully there isn’t a question like this somewhere else. Anyway, I was wondering if there was a way to keep music playing after a scene change. I don’t want a song to get cut off when a level is completed, nor do I want to have to make the song fade out or something.

If you want the object that is playing the music to persist between scene changes, add a script to it with the line:

void Awake() {
    DontDestroyOnLoad(transform.gameObject);
}

This means the gameobject the script is attached to won’t be cleaned up when the scene is changed.

You can use additive scene loading or
You can call DontDestroyOnLoad on the object who plays the music and it will survive the scene change.