Has anyone run into problems with audio sources marked as "don't destroy on load" stopping playback spontaneously when a new level is loaded? This would be in reference to (for example) playing a music track continuously from one level to another.
The only relevant thread I could find was this one, in which the OP describes what sounds like the same problem.
I've had some trouble reproducing the behavior consistently, but here are some things I've noticed:
Has anyone else run into this problem or problems like it? Is it a known bug? (I'll file a bug report, but as this basically means no music across level loads, I'd like to at least try to find out if it's user error, and if not, whether there's a workaround.)
asked Oct 15 '10 at 05:08 AM
If you know what's getting reset, I suppose you can just invoke a function that checks that (on load) and changes it back again.
Better yet, you can use a case switcher. It's a bit of extra code but it sure beats not having sound.
answered Nov 27 '10 at 04:24 PM
Try changing Load Type of sound's AudioImporter to Stream from Disk. Sometimes Unity destroyed the sound from memory while unloading the scene.
Also make sure that your AudioListener is not destroyed.
answered Jul 12 '11 at 01:27 PM