- Home /
PlayOneShot - skips and doubles the sound.
I've run into an awkward problem. I'm using PlayOneShot for some sounds in my code. The problem is - after playing a few sounds in a sequence, where a sound starts while the previous one is still playing (overlaping each other), the sound starts to "clogg up". The AudioSource skips some cycles and then plays them with a lag of a few seconds.
Now, before I start checking my 90-pages-long code - could this be caused by some Unity bug of PlayOneShot, or could this only be caused by a bad code?
Is there something I'm missing in the theory behind PlayOneShot? All sounds are in WAV, around 100-300 kb each.
Answer by Johnz1234 · Jun 07, 2015 at 04:32 AM
use AudioSource.playClipAtPoint(sound,transform.position);
Oh, my understatement. The Audiosource is moving, so PlayClipAtPoint "falls" behind the object as it moves. :P
Your answer
Follow this Question
Related Questions
WWW Audio and PlayOneShot: Playing the same AudioClip Twice Cuts off First Instance 1 Answer
2d PlayAudioOneShot inconsistent behavior 0 Answers
Can't get PlayOneShot() or Play() to work 1 Answer
Playing many audioclips with PlayOneShot causes all sound to cut out. 0 Answers
PlayOneShot won't work. 1 Answer