List
Adding Sound to AR Object.
Posted Date: 2019-09-17 15:36     Edited Date: 2019-11-07 22:47     Writer: inactive

1. SDK Version: MAXSTARSDK_Unity_4.1.4.unityPackage
2. Development Environment: Unity-Android
3. Tracker/Scanner: Instant Tracker
4. License Type: Free

Hello Maxst Support Team,

How can i play sound (AudioClip) automatically when target found then stop when target lost on instant tracker ?
Thank you.

Posted Date: 2019-09-18 5:34     Edited Date: 2019-09-18 5:34     Writer: inactive

Hello arkita.

1. Find the scene manager of the instant tracker scene and open the script.

2. Get the resource of the sound to play in the script.

3. In the Update () function of the script

Trace Failure Condition
if (trackingResult.GetCount () == 0)
Trace success condition
else

Play or stop the sound to be played under both conditions.

Thank you.

 

Leo

Maxst Support Team

Posted Date: 2019-11-07 22:47     Edited Date: 2019-11-07 22:47     Writer: inactive

Hi, I had teh same problem, but I have more than 10 image targets on scene, how can I now whick one is detected/lost so I can play the right audio clip specific to each image target?