I am currently working through the space shooter tutorial on the unity website and have gotten to the audio portion of the guide. I am using unity 5 and the MonoDevelop does not have Audio.Play(), nor does it have AudioSource.Play(). How do I have the script play a sound that is in the audio source of the player game object?
You probably didn’t set up the scrip correctly, try this:
@script RequireComponent(AudioSource)
public var otherClip: AudioClip;
function Update () {
if (Input.GetButtonDown("Fire1")) {
audio.Play();
}
}