Search Unity

Can I activate and deactivate the ARTrackedImageManager?

Discussion in 'AR' started by ruhlmcu, Sep 12, 2020.

  1. ruhlmcu

    ruhlmcu

    Joined:
    Dec 30, 2019
    Posts:
    7
    I have a small game app that has two UI panels for the user to work through before beginning to scan for a tracked image. All of this is working. However, the ARTrackedImageManager is actively seeking an image from the beginning. I really don't need it or want it to begin "looking" for an image until the second panel (promptPanel) is exited. The final panel (gamePanel) is an overlay of buttons on the scene while tracking an image and I do want the ARTrackedImageManager to be active at this point.

    Is there a way to activate or deactivate the ARTrackedImageManager or until the final panel is processed? If it is helpful I can add my ImageTracking script. Thanks in advance for your assistance.

    Below is a current screenshot of my AR Session Origin.

    Screen Shot 2020-09-12 at 9.32.32 AM.png
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Activating/deactivating AR managers is as simple as setting the 'enabled' property on them.
    var manager = FindObjectOfType<ARTrackedImageManager>();
    manager.enabled = false;
     
  3. ruhlmcu

    ruhlmcu

    Joined:
    Dec 30, 2019
    Posts:
    7
    Thanks so much. Sorry for such a basic question.