The only answers I’ve gotten are to use “Audio.play” or “Audio.PlayOneShot” but then how do I say which mp3 file to use? is there a certain file type I need to use? `function Update () {
if (Input.GetKeyDown (KeyCode.W))
{
audio.PlayOneShot();
}
if (Input.GetKeyup(KeyCode.W))
{
audio.PlayOneShot();
}
}`
The type you’re probably looking for here is AudioClip.
Play() plays the stored AudioClip in your AudioSource. (assigned in the Inspector or via “audio.clip = myClip;”)
PlayOneShot(AudioClip clip) needs a specific AudioClip, for example you can store it in a separate AudioClip field (eg. “public AudioClip myClip”) or load it via Resources.Load();