//private AudioSettings settings; void Awake() { if (singleton_instance != null && singleton_instance != this) { Destroy(this.gameObject); return; } else { singleton_instance = this; } DontDestroyOnLoad(this.gameObject); speaker = gameObject.GetComponent<AudioSource>(); }
//private AudioSettings settings; void Awake() { if (singleton_instance != null && singleton_instance != this) { Destroy(this.gameObject); return; } else { singleton_instance = this; } DontDestroyOnLoad(this.gameObject); speaker = gameObject.GetComponent <AudioSource>(); }