Сделал вот так, но почему то звук не заглушается
[RequireComponent(typeof(AudioSource))]
public class menu_s : MonoBehaviour
{
public GameObject spritelogo;
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
if(Input.GetKey (KeyCode.P))
{
GetComponent<AudioSource>().mute = false;
}
}
}