Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Switching between image, AirAnchor and Face tracking not working properly on Android

Discussion in 'AR' started by Suwas93, Sep 20, 2020.

  1. Suwas93

    Suwas93

    Joined:
    Feb 8, 2018
    Posts:
    62
    I'm switching back and forth between Image tracking, Air anchoring & Face tracking in my App (I'm appropriately changing the camera direction and ARSession tracking mode while I do that). The image tracking stops working. Is there a recommended way to do this?
     
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,128
  3. Suwas93

    Suwas93

    Joined:
    Feb 8, 2018
    Posts:
    62
  4. dayliff2

    dayliff2

    Joined:
    Jan 3, 2019
    Posts:
    3
    Figured out how to fix the issue, restart the ARTrackedImageManager with a link to the reference library:

    ARTrackedImageManager.enabled = false;
    ARTrackedImageManager.referenceLibrary = yourReferenceLibrary;
    ARTrackedImageManager.enabled = true;