Audio mutes when tracker is lost

What I’m looking for is basically explained in the question.

I’ve got some audio that I want to mute (not stop/pause) when the AR tracker is lost then unmute when it is found again. I know this will involve coding, could anyone head me in the right direction?


It’s hard to help when you haven’t posted any code by the AR. But I’m guessing the AR will have an event thats called when the tracker is lost and found.

So you want to do something like this:

if(trackerFound == true){
	audio.mute = false;
	audio.mute = true;

And attach this to the Game Object that has the audio source on it. This wont work if you just copy and paste, as trackerFound is just a made up event. You need to check inside your AR script for an event that gets called every time the tracker is lost/found.

Like I said, post some of the AR code up and we’ll be able to help. Also, what AR plugin are you using? Vuforia?

Well, why don’t u set the AudioSource Volume to 0 when the tracker is missing?