By waheed
on Wed, 06/20/2012 - 17:06
Hello,
I use QCAR-iOS-1.0.0beta1.unitypackage, my MacOS version is 10.6.7
Xcode version Version 4.1 (4B110f), Unity version is 3.4.0 f5, my iPhone device model is iPhone 4 GSM, OS vision 4.3.2
the problem is, there is no sound when I run the application on my iPhone , I didn't face this problem with android . I have an audio clip (mp3 format) and I attached to my ImageTarget object in Unity , I want to play this clip when ImageTarget is detected and pause it when the target lost , so I modified the code in TrackableEventHandler.cs as the following :
private void OnTrackingFound()
{
Renderer[] rendererComponents = GetComponentsInChildren();
// Enable rendering:
foreach (Renderer component in rendererComponents) {
component.enabled = true;
}
audio.Play();
Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found");
}
private void OnTrackingLost()
{
Renderer[] rendererComponents = GetComponentsInChildren();
// Disable rendering:
foreach (Renderer component in rendererComponents) {
component.enabled = false;
}
audio.Pause();
Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " lost");
}
------------
as you see audio.Play() & audio.Pause() has been added. and the audio clip is already attached to my ImageTaregt object in Unity, but there is no sound . my clip is 2D sound and I checked all its attributes including the volume.
please how to solve this problem.
Thank you,,,
Re: Sound problem
Re: Sound problem
Re: Sound problem