I’ve found this problem when I pause the game then unpause it the sound that I pause eg. eff sound is playing
why is it happening plss help
this is my code
void Start () {
ASource = GetComponent<AudioSource> ();
ASource.Pause ();
}
void Update(){
if (gameObject.transform.position.y > -5.1f) {
ASource.volume=PlayerPrefs.GetFloat("VolumeRatio_FX");
ASource.Play();
PlayerPrefs.SetInt("Kc",PlayerPrefs.GetInt("Kc")+1);
PlayerPrefs.SetInt("Money",PlayerPrefs.GetInt("Money")+1);
Anim.speed = 1.0f;
}
}