I'm having problems with a project. I configured a button to turn the sounds on and off, it works on the pc, but when I put it on the phone it only works if I click on two places at the same time on the touch, if I just click the button it recognizes the ringtone, but type turn the sound back on) ...
case TouchPhase.Began:
som = true;
gameObject.GetComponent.<AudioSource>().Play();
player_controle.ativarSom = 2;
som = false;
break;
if (ativarSom > 1){
PlayerPrefs.DeleteKey("caso1");
PlayerPrefs.DeleteKey("caso2");
PlayerPrefs.DeleteKey("caso3");
PlayerPrefs.DeleteKey("caso4");
som *= -1;
ativarSom = 1;
}
if(som == 1 && efeitos == 1){
PlayerPrefs.SetInt("caso1", acustica);
}
if(som == 1 && efeitos < 1){
PlayerPrefs.SetInt("caso2", acustica);
}