Audio clip not playing

I have the lines audio.Pause(); and audio.Play(); and I inserted a debug statement, it says its playing, but i dont hear the clip, any suggestions?

any one?

Do you have an audio source attached to the game object that you’re trying to play the clip on?

yeah

Did you specify the audioclip to play?

var myClip : AudioClip;

function Update()
{
audio.Play(myClip);
}

i set it with audio.clip = myClip; or however you do that

The way I’ve written it above you should be able to drag the audio clip to the variable slot in the inspector. Just as a test, you can try various things. Check “play on awake” in the inspector.

Also, make sure you have an audio listener somewhere close enough to hear the clip. Try playing your sound from the terrain or from the main camera where there’s no doubt that the audio listener is able to pick it up. I’m just making suggestions. These are things I would try under the circumstances. Perhaps someone else will have an idea. Also, I’m assuming the clip is one of the compatible formats. MP3, .WAV etc.

the camera has an audio listener, and the audio source attached to it

With this type of problem, it is far easier to determine what is wrong if you upload the project for us to look at. If it is already inside of a game, please create an empty project with only the necessary components for audio and upload that instead.

I wish I could be of more help, but I believe this would return results far faster than questions+answers on the forum.

ok, where should i upload it? in the past, the community forums havent been to happy if the file is that large