Hi everybody !
I have a mute script attached to a “Settings” scene. How I can use the playerprefs to save and work in another scene ? I tried very much solutions but nothing is working …
Here is my script:
#pragma strict
var muted = false;
var CustomSkin: GUISkin;
var musicMute : GUIStyle;
var allSound : GUIStyle;
function Start (){
}
function OnGUI(){
GUI.skin = CustomSkin;
if(GUI.Button(new Rect(Screen.width * 0.20,Screen.height * 0.40, Screen.width * 0.20, Screen.height * 0.20), "Sound"))
{
if(muted == false){
AudioListener.volume = 0;
muted = true;
}
else{
AudioListener.volume = 1;
muted = false;
}
}
}