Hi guys, This script below isn't working. I've just spent the last 2 hours trying to get it to work but it just isn't happening. My sound file has been converted to a .ogg file, and everything looks correct to me and I get no compile errors. Anyone see what's wrong?
I need it to play the sound when the player touches the object. I am using the FirstPersonControllerPrefab from IslandDemo.
Thanks in advance
var moon : AudioClip; // set this to your sound in the inspector
function OnCollisionEnter (collision : Collision) {
// next line requires an AudioSource component on this gameobject
audio.PlayOneShot(moon);
}