- Issue category: Meshing
- ARDK version: 3.0
Hi,
I would like to know how to delete the meshes generated by the ARMeshManager so that I can start from scratch with new ones. I am talking about some method equivalent to ClearMeshObjects() in ARDK 2.5.2. So far I have tried the following:
_arMeshManager.DestroyAllMeshes();
_arfSession.Reset();
DestroyAllMeshes() deletes the existing meshes, but they show up again with the same size and shape if the ARMeshManager is still enabled. Even if I reset the ARSession inmediately after destroying the meshes, new Trackables are automatically created with the same old meshes.
I have also tried deleting the ARMeshManager and creating a new one, but the old meshes still show up, I guess because they are not stored in the manager but in the meshing subsystem. So I tried destroying the subsystem, but after that I don’t know how to restart it again. ARMeshManager.subsystem.Start() doesn’t work for that.
The only thing that allows me to completely reset the meshing subsystem is to reload the scene, but this solution does not fit into the workflow of my application.
I asked this question on the Unity forums and got an answer that might be appropriate for iOS phones, since meshing in AR Foundation is only available on them, but not on Android. But I am working with Android.
Thanks in advance