audio.PlayOneShot Lag !

Hello , Is there any fix to audio.PlayOneShot ?
When the sound play , it play too slow :frowning:
Any idea ?

using UnityEngine;
using System.Collections;

public class DestroyByScore : MonoBehaviour {
	public Score scoreScript;
	public AudioClip AmerFX;

	
	void Start()
	{
		//Find Scripts GameObject, and get Score Component.
		scoreScript = GameObject.Find ("Score").GetComponent<Score>();
	}
	
	void Update()
	{
		if(scoreScript != null && scoreScript.score >= 100)
			Destroy (gameObject);
			audio.PlayOneShot(AmerFX);
	}
}

Thanks in advance!:slight_smile:

If the audio is a compressed format like .mp3 or .ogg, that will always take longer to play. Make sure you are using .wav for any sound effects.