Search Unity

  1. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Resolved ARMeshManager should support being disabled

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

  1. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    131
    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:
    131
    Fixed it for you.

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

    KirillKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    759
    "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:
    131
    • 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. KirillKuzyk

    KirillKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    759
unityunity