Log in or register to post comments

Getting Sound in Scenes

September 15, 2011 - 4:48am #1

This is one of the script to add sound to the objects..

Using C# :

using UnityEngine;
using System.Collections;

public class AudioPlay : MonoBehaviour {
void Awake()
{
audio.Play();
}
}

It seems that this script is run even when the trackable image is not in the camera.
Did anyone knows how to add the audioplay when the trackable image is set to the camera?

Re: Getting Sound in Scenes

September 15, 2011 - 10:20am #2

Take a look at the TrackableEventHandler script that comes with the sample applications. Try playing your sound in the the OnTrackingFound method.

- Kim

Log in or register to post comments