ok so i’ve got my simple code:
var mental : AudioClip;
function Update () {
if (Input.GetButtonDown ("Fire1")) {
audio.PlayOneShot(mental);
if (Input.GetButtonUp ("Fire1"))
audio.Stop(mental);
}
}
And unity says -
Assets/My Scripts/MouseSound.js(9,19): BCE0017: The best overload for the method 'UnityEngine.AudioSource.Stop()' is not compatible with the argument list '(UnityEngine.AudioClip)'.
I have no idea what’s going on…