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();
An AudioClip can be MP3, WAV, OGG or AIF.
↧