Skip to content

Rozhovetskyi/AR-Support-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AR Support Checker openupm Codacy Badge

Unity package for AR supported (ARCore, ARKit, AR Foundation) devices detection.

How to use

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.

How it works

Android

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.

iOS

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.

Editor and Other Platforms

In Unity Editor and on other platforms it always returns false.

Example

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");
            }
      }
}

License

MIT (c) Yevhen Rozhovetskyi

About

Unity package for ARCore / ARKit / AR Foundation supported devices detection.

Topics

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta

Stars

Watchers

Forks