Simple question but make me blur.
I have an audio source on let say “Main” scene, and I make it DontDestroyOnLoad, which make it could keep playing my audio even i going next scene, let say “Game” scene.
Problem is, when i get back from “Game” scene to “Main” scene, my audio will restart over but not continue playing as i expected. How should i actually script for this?
My current script :
void Awake() {
if (instance != null && instance != this) {
Destroy(this.gameObject);
return;
} else {
instance = this;
}
DontDestroyOnLoad(this.gameObject);
}