Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Check if device supports ARCore before starting ARSession ?

Discussion in 'AR' started by s7ubborn, Aug 8, 2019.

  1. s7ubborn

    s7ubborn

    Joined:
    Oct 1, 2015
    Posts:
    3
    Hi,

    I would like to know how do you approach checking whether a device is compatible with ARCore *before* starting ARSession when using AR Foundation?

    The ARSession class is read-only and if I check availability before starting ARSession it is always ARSessionState.None. From my understanding, If I want to get the ARSessionState.Unsupported I will have to go through the OnEnable of the ARSession - which will start an ARSession, trigger camera permission (which I don't want) and only then will give report a state different than ARSessionState.None.

    Should I write my own native plugin to determine whether a device supports ARCore or is there an easier way?

    Cheers,
    Borislav