Question by
AceSalcedo05 · Oct 28, 2017 at 08:59 AM ·
audioscenesoundscript error
Having problem in turning on/off the sound when going to another scene and going back to menu
The Problem is, my sound doesn't turn off !
I am using a Toggle for the On/Off Sound
When the game starts and try to turn off the sound by pressing the music toggle it functions, but when i go to another scene and go back to the main scene and pressing the Music Toggle/Music Option (The music doesn't turns off)... How will it function again??
My Script is here ::
void Start()
{
}
private static BGMusic instance = null;
public static BGMusic Instance
{
get { return instance; }
}
void Awake()
{
if (instance != null && instance != this)
{
Destroy(this.gameObject);
return;
}
else
{
instance = this;
}
DontDestroyOnLoad(this.gameObject);
}
}
Comment