Search Unity

Resolved Official device support check for LiDAR in ARFoundation?

Discussion in 'AR' started by joeri_07, Mar 5, 2021.

  1. joeri_07

    joeri_07

    Joined:
    Dec 18, 2015
    Posts:
    45
    Hi all,

    I made a really cool game in AR and it is using the ARMeshManager to do stuff. However this ofcourse is only working on the iPhone 12 pro and iPad Pro 2020. I need some kind of fallback mechanism where I implement my game using the ARPlaneManager instead of the meshmanager. Only problem is.. how can I detect this during runtime? I tried checking for "myMeshManager == null ", but even if the MeshManager is not supported on the device, it is still being created, it is just not functioning.

    I find it really weird that ARFoundation hasn't provided us with a simple method or variable to at least check if MesManager is supported! I really hope I am overlooking some documentation on this, but I couldn't find anything.

    Thank you!
     
    ina likes this.
  2. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,144
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    To build off of what @KirillKuzyk said, myMeshManger.subsystem == null when the device does not support meshing.
     
    KyryloKuzyk likes this.
  4. joeri_07

    joeri_07

    Joined:
    Dec 18, 2015
    Posts:
    45
    Yes I found it! Thank you both.
     
  5. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,085
    Does this always work?