void OnEnable() { //attach method to scene load event SceneManager.sceneLoaded += OnSceneLoaded; audioSource = GetComponent <AudioSource>(); audioSource.loop = true; DontDestroyOnLoad(gameObject); if (audioSingleton == null) { audioSingleton = this; } else { Destroy(gameObject); } }
void Awake() { current = this; audioSource1.loop = true; }