How to make text disappear once the app recognizes an image target (via Vuforia)?

How to make text disappear once the app recognizes an image target (via Vuforia)?

I’m trying to create an AR app which tells users instructions before they place their phone camera on a greeting card. How can I make this text disappear once the user projects their camera on the greeting card and recognizes one of the image targets associated with the card?

  • Using Vuforia for the AR App

Hello @sunflowerchocolate in the imagetarget replace the DefaultTrackableEventHandler component with this component

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Vuforia;
 
public class CustomTrackableEventHandler : DefaultTrackableEventHandler {

public GameObject TheText;
 
protected override void OnTrackingFound()
{
  base.OnTrackingFound ();

  TheText.SetActive(false);
}
 
protected override void OnTrackingLost() {
  // you can even do something on tracking lost
  base.OnTrackingLost ();
}
 
}