|
I have this var clip : AudioClip; function Update () {
if( Input.GetButtonDown("w") ) {
audio.Play(AudioClip); but unity says: no appropriate version of unityengine.audiosource,... what do i need to do??
(comments are locked)
|
|
Change to:
(comments are locked)
|
|
You're using the type instead of the variable. Should be just "audio.Play()", and assign the clip using "audio.clip = clip". I now have this: var clip : AudioClip; function Update () { if( Input.GetButtonDown("w") ) { audio.Play(clip); still the same error
Dec 19 '10 at 08:15 PM
user-7113 (google)
I now have audio.clip = Clip; function Update () { if( Input.GetButtonDown("w") ) { audio.Play(); But it now says clip is an unknown identifier,.. sorry for being a noob
Dec 19 '10 at 10:08 PM
user-7113 (google)
Don't remove "var clip : AudioClip". Put audio.clip = clip in Start or wherever.
Dec 19 '10 at 10:41 PM
Eric5h5
(comments are locked)
|
