Hello Unity Masters, i have a simple question. I made an application for the Samsung Gear VR, this APK have 9 scenes (1 scene select menu and 8 scenes), I use a script that allows me to use the same background music in all the 8 scenes whitout stop between them (DontDistroy script), my problem is when I return to the select scene menu, the audio that play in the 8 scenes don’t stop, it mix whit the background music that is for the select scene menu.
How can I stop the music when I return to the Select scene menu?
Please help guys
DontDistroy script
using UnityEngine;
using System.Collections;
public class DontDestroy : MonoBehaviour {
void Awake ()
{
GameObject [] objs=GameObject.FindGameObjectsWithTag("music");
if(objs.Length > 1)
Destroy(this.gameObject);
DontDestroyOnLoad(this.gameObject);
}
}