hello,
i want to play a background music in the menu of a game.
i made the song in “Loop” mode, in their properties.
i used the funtion:
function Update () {
DontDestroyOnLoad (this);
}
for continue playing the song when i enter in a submenu (they are other Scenes).
i did drag the sound source to an empty, and i emparented this script.
i have the problem that when i enter in a submenu, and later i return to the main menu, the song continues playing correcty, but appears other instance of the song playing from the start when i enter in the main menu.
how i can do to not trigger other instance of the song if it is already playing?