hello
can someone please help me , i tried but always get a syntax error
float minPitch = 1.0f;
float maxPitch = 2.0f;
public void PlayRandomPitchSound(AudioClip clip)
{
float randomPitch = (Random.Range(minPitch, maxPitch));
audio.pitch = randomPitch;
audio.PlayOneShot(clip);
}
Try that. I’m not very profecient at C#, but I think that should do the trick (Oh, and also ofc place it in a class)
There is this very handy tool that might be useful in your case.
thank you guys