Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice
  4. 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:
    158
    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:
    158
    Fixed it for you.

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

    KirillKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    859
    "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:
    158
    • 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:
    859
unityunity