Unity package for AR supported (ARCore, ARKit, AR Foundation) devices detection.
Add the package using one of the following ways:
- Import ARSupportChecker.package to your project
- Via Package Manager / + / Add package from git URL...
https://github.com/Rozhovetskyi/AR-Support-Checker.git - Via OpenUPM command:
openupm add com.rozhovetskyi.arsupportchecker
Use ARSupportChecker.IsSupported() method to check if ARKit / ARCore is supported on the device.
As Google Play Services for AR is automatically installed and updated on supported devices it will return true if com.google.ar.core package is installed on the device.
Uses ARWorldTrackingConfiguration.isSupported property to detect if the device supports ARWorldTrackingConfiguration session configuration class.
As ARKit requires iOS 11.0 or later for versions lower than that it returns false.
In Unity Editor and on other platforms it always returns false.
using ARSupportCheck;
public class Demo : MonoBehaviour
{
void Start()
{
if (ARSupportChecker.IsSupported() == true)
{
Debug.Log("AR is supported on this device");
}
else
{
Debug.Log("AR is not supported on this device");
}
}
}
MIT (c) Yevhen Rozhovetskyi