Search Unity

Resolved ARMeshManager should support being disabled

Discussion in 'AR' started by Fangh, Oct 21, 2021.

  1. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    274
    How to reproduce :
    1) have a scene with an AR Session Origin and an ARMeshManager on it
    2) disable the game object
    3) press play
    4) you have an error because ARMeshManager must be on ARSessionOrigin => but it is !

    upload_2021-10-21_15-11-13.png
     
  2. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    274
    Fixed it for you.

    upload_2021-10-21_15-20-14.png
     
  3. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,143
    "Must be a child" means that ARMeshManager should be on a GameObject that is a child of ARSessionOrigin's transform. But you place it on the same game object.
     
  4. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    274
    • if you look at my screenshot, it does a GetComponentInParent line 174
    the documentation says : "Retrieves the component of Type type in the GameObject or any of its parents"
    with that in mind either the code is wrong, either the error message is wrong.

    • Placing the ARMeshManager on the SessionOrigin GameObject works perfectly
    • In this documentation it says : "All the trackable managers must be on the same GameObject as the AR Session"

    With those information, I really think the error message is wrong AND that they should add a security to not display this message when the object is disabled. Please, correct me if I'm wrong.
     
  5. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,143