- Home /
Question by
ok1wwa22 · Jan 22, 2013 at 02:09 PM ·
audioaudio.play
Audio plays when i click F
Hello guys, i'm beginner in making script's. So i wrote a script when i click F, the audio play. But that's not happening? What could be wrong?
There is the script:
function Update () {
if (Input.GetKeyDown("f"))
(audio.play("kartka.wav"));
;
}
If you guys know the solution how to solve this problem, just write it. It help me so much.
Comment
Answer by Dave-Carlile · Jan 22, 2013 at 02:13 PM
You can't play audio by passing in a filename.
Look at the answer in this question for various ways of playing audio...
http://answers.unity3d.com/questions/12546/playing-audio-clip.html