- Home /
This question was
closed Apr 24, 2015 at 09:13 AM by
Abacab for the following reason:
Other
Question by
Abacab · Apr 24, 2015 at 07:55 AM ·
c#buttonaudioaudiosource
Delayed Button Sounds
Hello!
Yesterday I added button sounds to almost all buttons in the menu, but for some reason they are delayed on iPhone (0,2-0,5 seconds at most). What could be causing this? They are not delayed in the Unity editor. My audio source is the Main Camera.
public class MenuButtons : MonoBehaviour
{
public GameObject loadScreen;
public AudioClip buttonSound;
public AudioSource audioSource;
void Awake ()
{
audioSource = audioSource.GetComponent<AudioSource> ();
}
public void MainMenu ()
{
loadScreen.SetActive (true);
audioSource.PlayOneShot (buttonSound);
Application.LoadLevel ("Main Menu");
}
Comment
Edit->Project Settings->Audio->DSP Buffer Size->Best Latency worked.
Follow this Question
Related Questions
Audio is always playing 0 Answers
PlayClipAtPoint Qualify with Type Name 2 Answers
Audio/c#/unity Can i control the duration by time ? 1 Answer
audio doesn't play on movement 0 Answers
Audio won't fade out. 1 Answer