How to reproduce :
- have a scene with an AR Session Origin and an ARMeshManager on it
- disable the game object
- press play
- you have an error because ARMeshManager must be on ARSessionOrigin => but it is !
How to reproduce :
“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.
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.
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.
It seems like it was fixed in AR Foundation 4.2.0-pre.7:
https://github.com/needle-mirror/com.unity.xr.arfoundation/commit/9d1caf96cd2efff14e3d66ae082c9b919b0cdb56#diff-463813eb57a6cf67e518089ac8aa2cca86e55c1876578fd5cbce29f88c2d21ff