Random Meshes Being Generated at runtime for ARSession and ARMeshManager

It seems to me that there are random meshes that are being generated for the ARSession and the ARMeshManager objects.

I have a few questions surrounding these things.

  1. Is there an extended tutorial or documentation that I can be pointed two surrounding these two objects? I know that for visionOS integration that you will need an ARSession object, but I don’t want these random meshes that appear.

  2. What is the significance of the ARMeshManager object? What is the most practical use case for it? I will only need to generate primitive shapes, as all my meshes will be predetermined at runtime.

  3. What is the significance of these random meshes that are being generated by both of these objects at runtime?

  4. When I make a production build for visionOS, are these meshes going to appear if I have an ARSession or ARMeshManager object instantiated at runtime? Ideally, I don’t want anything generated by these two objects.

Any assistance or guidance around these two objects/classes is greatly appreciated. Thanks!

Hi,

First question - is this with PlayToDevice?

These meshes seem to be the XR simulation environments used to debug and test XR features in Unity editor only, and thus if you build to VisionOS, they shouldn’t appear. PlayToDevice replicates all objects in your editor’s scenes, however, and so when using PlayToDevice, these meshes get replicated over.

For the ARMeshManager I would suggest reading the docs or looking up videos on the ARMeshManager to get ideas on how to use it, as it is not a component that is exclusive to PolySpatial or VisionPro. It generates meshes based on scanned geometry, allowing you to place objects on top of scanned meshes and enables physics-based interactions with the environment.

Hope this helps!

Yes, this is with Play to Device. If it is just for debugging purposes in the XR Simulator, I’ll be fine with hiding the ARSession and ARMeshManager objects until I am ready to make a TestFlight build.

I’ll take a look at the documentation that you have suggested and go from there. Thank you!