Hello, I could use some help on this sound while walking C# script. When I walk the sound loops and overlaps (because it’s in the update function). How do I make sure the sound doesn’t play for an certain amount of time (say half a second?
my current code `public AudioClip walkSound;
void Update () {
if (Input.GetButton("Vertical") || Input.GetButton("Horizontal") ){
audio.PlayOneShot(walkSound);
}
}
}`
thanks guys