Search Unity

Question ARTrackedObjectManager error when re-using a trackable after disabling / re-enable script

Discussion in 'AR' started by Wolfie_lu, May 31, 2021.

  1. Wolfie_lu

    Wolfie_lu

    Joined:
    Mar 29, 2018
    Posts:
    4
    Hello,


    I'm getting a weird error in iOS app with AR Foundation and ARKit. I used the same code for ARTrackedImageManager and everything works perfectly.

    " Could not find reference object with guid 00000000-0000-0000-000000000000 "
    from UnityEngine.XR.ARFoundation.ARTrackableManager'4:Update()

    This error occurs when I
    1 - scan an object ( a prefab is spawned with 'add' from OnTrackedObjectsChanged)
    2 - ARTrackedObjectManager is disable for battery purpose and OnTrackedObjectsChanged is -=
    3 - ARTrackedObjectManager is enable and OnTrackedObjectsChanged is +=
    4 - if I scan a new object, no error, but for a old object, I get the error just before the 'update' from OnTrackedObjectsChanged...

    Where does it come from ?

    Thanks !

    Using Version 4.1.0-preview.13
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    A bit of insight & guidance from the team:

    You should not be using a preview version. First, you should upgrade to a released version and retry. If the issue still persists, please file a bug report for us.

    https://unity3d.com/unity/qa/bug-reporting
     
  3. Silverbers

    Silverbers

    Joined:
    Apr 5, 2019
    Posts:
    3
    Hi!
    Have you fixed this bug?
    How to fix this bug?
     
  4. Silverbers

    Silverbers

    Joined:
    Apr 5, 2019
    Posts:
    3
    I`m using v4.17 , it`s not preview version.
    but i still have this problem
     
  5. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    Please file a bug report for us.
     
  6. Wolfie_lu

    Wolfie_lu

    Joined:
    Mar 29, 2018
    Posts:
    4
    So sorry for not been responding.
    Actually, app can crash when you disable ARTrackedObjectManager
    Our solution was to not disable this managed... Our app has now some lagging.
    No matter the package same problem.
    Didn't write a bug report but maybe I going to do it one day sorry :')
     
  7. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,144
    Unfortunately, it seems like an ARKit bug and only Apple can fix it:
    https://github.com/Unity-Technologies/arfoundation-samples/issues/641