x


Help playing sound on keypress

I want to play a sound when I press the number "1" in the keyboard, how do I do it

more ▼

asked Jun 20 '12 at 08:12 PM

phoenixentco7 gravatar image

phoenixentco7
0 1 1 1

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

Playing AudioClip is described here: http://answers.unity3d.com/questions/12546/playing-audio-clip.html

Input.GetKey(KeyCode.Alpha1) will catch the "1" on the keyboard I think.

more ▼

answered Jun 20 '12 at 09:05 PM

Huma gravatar image

Huma
17 1 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3325
x523
x155
x40

asked: Jun 20 '12 at 08:12 PM

Seen: 671 times

Last Updated: Jun 20 '12 at 09:05 PM