I’m having what seems to be a strange (as in I’ve searched the forums for an hour and couldn’t find something similar) problem where all sound effects played in the beta on an iPad (I haven’t tested on other devices) are delayed by half a second or so before playing. That is, I’ll touch the screen and there will be a pause before the audio plays. Everything else seems to running snappy.
What’s odd is that this same code/sound samples/project/everything works fine in 1.7.x. I’ve compared the projects between the beta and 1.7.1 and can’t find any differences. I’ve created a new project from scratch with the same problems.
My audio clips are about one second in length, uncompressed WAVs. I’ve tried importing them compressed, unchecking 3D sound, saving as different Hz rates, toggling streaming, etc. No difference.
On the coding end, I’m storing a handful of audio clips in an audio clip array and am playing them back with a simple audio.PlayOneShot(myAudioArray[someint]) command. PlayOneShot() and Play() result in the same delay.
This problem is happening in both beta 5 and 7 (the only two I’ve tested).
Is there a way I can view this bug using the case number posted? It seems you need “__a1b2c3d4” on the end of the case number to get to it in fogbugz - not just the number.
You can’t consult the bug database directly but if you e-mail support@unity3d.com, the QA team can give you an update at their discretion. However, in this case I have had a look at the database - no progress on the bug yet, as far as I can see.
Noone else experiences this problem anymore? Maybe I’m just doing something wrong, but my audio doesn’t play immediately, and I’m using the Final release. It’s an uncompressed wav that I’m triggering in script using PlayOneShot()
I have an audio listener on the camera, an audio source on my player object, and the code is triggered by Input.GetMouseButtonUp
the mouse button should play the sound and trigger an animation, but the animation is always finished (very short animation) before the audio plays. In the preview it has no empty air at the beginning and plays ok.
edit: I guess I should mention since this is the IOS forum that I have UnityIOS but I’m doing most of my development on a PC, and haven’t tested deploying it to an iphone yet.
i am having this problem on the ipad2.
the instantiate works instantly, the audio is delayed.
var hit : RaycastHit;
if (Physics.Raycast (ray, hit) hit.transform == this.transform)
{
// Create a particle if hit
audio.Play ();
Instantiate (particle, transform.position, transform.rotation);
}