Google is committed to advancing racial equity for Black communities. See how.

Enable ARCore

Before you start developing augmented reality experiences for your app, you must enable ARCore functionality in your Unity project. To do this, you need to:

  1. Have a working project using AR Foundation
  2. Install the ARCore Extensions package
  3. Configure your app to be AR Required or AR Optional
  4. Perform runtime checks
  5. Configure your app to be Depth Required or Depth Optional
  6. Ensure that your app complies with ARCore's user privacy requirements

Install the ARCore Extensions package

The ARCore Extensions for AR Foundation add functionality to Unity’s AR Foundation package, enabling you to add features such as Cloud Anchors, Camera configuration filters, and Recording and Playback to your app.

Follow these steps to install ARCore Extensions for AR Foundation.

  1. Download the latest arcore-unity-extensions-*.tgz from the ARCore Extensions for AR Foundation releases page on GitHub.
  2. Open an existing project in Unity, or create a new 3D project.
  3. Navigate to Window > Package Manager.
  4. Click the button and choose the Add package from tarball... option from the drop-down menu.

    Add package from tarball… in Unity Package Manager

  5. Locate the arcore-unity-extensions-*.tgz on your machine, then click Open.

You should now see “ARCore Extensions” installed.

Configure your app to be AR Required or AR Optional

An app that supports AR features can be configured in two ways: AR Required or AR Optional.

An AR Required app cannot function without ARCore. It needs an ARCore supported device that has ARCore, also known as Google Play Services for AR, installed on it.

  • The Google Play Store makes AR Required apps available only on devices that support ARCore.
  • When users install an AR Required app, the Google Play Store automatically installs Google Play Services for AR. However, your app must still perform additional runtime checks in case Google Play Services for AR must be updated or has been manually uninstalled.

An AR Optional app uses ARCore to augment a different functionality. It has optional AR features, which are activated only on ARCore supported devices that have Google Play Services for AR installed.

  • AR Optional apps can be installed and run on devices that don't support ARCore.
  • When users install an AR Optional app, the Google Play Store will not automatically install Google Play Services for AR with the app.
AR RequiredAR Optional
AR Feature usage Your app needs ARCore for basic functionality. ARCore augments your app's functionality. Your app can run without ARCore support.
Play Store visibility Your app is only listed in the Play Store on devices with ARCore support. Your app follows normal listing procedures.
Google Play Services for AR installation method The Play Store installs Google Play Services for AR alongside your app. Your app uses ARSession.state to download and install ARCore.
Must use ARSession.state to check ARCore support and install status

For more information, see our app distribution overview.

Select your app's AR Provider

Regardless of whether your app is AR Required or AR Optional, you need to select the corresponding provider based on the platform so the app can access AR functionalities at runtime. Follow these steps to select your app’s AR provider.

Android:

  1. Navigate to Edit > Project Settings > XR Plug-Management > .
  2. Check ARCore under Plug-in Providers.

iOS:

  1. Navigate to Edit > Project Settings > XR Plug-Management > .
  2. Check ARKit under Plug-in Providers.

Make your app AR Required

Android:

Navigate to Edit > Project Settings > XR Plug-in Management > ARCore. Requirement is set to Required by default.

iOS:

Navigate to Edit > Project Settings > XR Plug-in Management > ARKit. Requirement is set to Required by default.

Make your app AR Optional

Select Optional from the Requirement drop-down menu to set an app to AR optional.

Android:

iOS:

Perform runtime checks

During runtime, AR Required apps will automatically perform runtime checks to ensure that the target device:

  • Supports ARCore
  • Has installed Google Play Services for AR — if this is not installed (possibly because it was removed by the user) or the version is too old, your app will prompt the user to install or update it.
  • Has up-to-date ARCore device profile data — if it is out of date, your app will download new data.

Set ARSession.attemptUpdate to false to disable these default checks. Your app should still handle these conditions:

Condition Action
Device does not support ARCore. Hides AR-related functionality.
Device supports ARCore, but Google Play Services for AR and/or ARCore device profile data is not installed or out of date. Prompts the user to install or update Google Play Services for AR and/or ARCore device profile data by calling ARSession.Install().
Device supports ARCore and Google Play Services for AR and ARCore device profile data is installed and up to date. Creates an ARCore Session and starts using ARCore.

You can also check the ARSession.state for installation and support states.

Configure your app to be Depth Required or Depth Optional (Android only)

If your app requires Depth API support, either because a core part of the AR experience relies on depth, or because there's no graceful fallback for the parts of the app that use depth, you may choose to restrict distribution of your app in the Google Play Store to devices that support the Depth API.

Make your app Depth required

To make your app AR Required, navigate to Edit > Project Settings > XR Plug-in Management > ARCore. Depth is set to Required by default.

Make your app Depth optional

Select Optional from the Depth drop-down menu to set an app to Depth optional.

Privacy requirements

Make sure that your app complies with ARCore's user privacy requirements.

Next steps