- Home /
Script Error: BCE0023: No appropriate version of 'UnityEngine.AudioSource.Play' for the argument list '(System.Type)' was found.
No appropriate version of 'UnityEngine.AudioSource.Play' for the argument list '(System.Type)' was found.
When I was working with Unity 3.4.2 and below, I didn't have this problem. But now, after using Unity 3.5 Public Beta, the following script refuses to work due to the error above:
var blipSound = AudioClip;
function playSound(){
Debug.Log("Audio Playing.");
audio.Play(blipSound);
}
What's up with that?! Can anybody help?
Answer by SpeedySpikes · Feb 19, 2012 at 10:40 PM
Never mind... I erased the (blipSound)
and added an Audio Source with the clip I wanted to play in that. Then, I ran the script and it worked. Sorry for the trouble, people!!
;)
Answer by Graham-Dunnett · Feb 18, 2012 at 07:58 PM
var blipSound : AudioClip;
function playSound(){
audio.clip = blipSound;
audio.Play();
}
I have not compiled this code. Essentially at 3.5 you need to tell Unity what type each variable has, and the Play() function doesn't take a clip as an argument.
Your answer
![](https://koobas.hobune.stream/wayback/20220613064220im_/https://answers.unity.com/themes/thub/images/avi.jpg)