Quantcast
Viewing latest article 13
Browse Latest Browse All 28

Answer by TheCatProblem

In a nutshell, call [DontDestroyOnLoad()][1] on the object containing the AudioSource playing the music. For additional details (including a simple way to avoid multiple copies of the same persistent object being created, which could happen in this case if you later return to the main menu without destroying the original music-producing object), see the answer to [this question][2]. [1]: http://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html [2]: http://answers.unity3d.com/questions/11314/audio-or-music-to-continue-playing-between-scene-c.html

Viewing latest article 13
Browse Latest Browse All 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>