Hi there…I would like to vary a sound’s pitch each time it is triggered…this script seems to vary once on the scene start,but not afterwards…
function Update () {
var startingPitch : float;
audio.pitch = startingPitch + (Random.Range(0.1,2.0));
audio.Play();
}
Also…do I attach this script to the sample itself,or the gameobject?
Apologies for newbiness…just beginning unity recently…cheers!