I have an audio that is set to DontDestroyOnLoad() but I want it to destroy on certain scenes, is it possible to check that and make the audio only DontDestroyOnLoad() if it is a certain scene?
Here is my script currently:
using UnityEngine;
using System.Collections;
public class dialogueclassicexist : MonoBehaviour {
void Awake() {
DontDestroyOnLoad(gameObject);
}
}
↧