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

Enable ARCore

This page describes how to enable ARCore functionality in your Unity projects. To do this, you need to:

  1. Create a new project and import the ARCore Extensions package
  2. Configure your app to be AR Required or AR Optional
  3. Make sure your app complies with ARCore's User Privacy Requirements

Google Play Services for AR

ARCore SDKs make AR features available on ARCore supported devices that have Google Play Services for AR (ARCore) installed.

Google Play Services for AR is automatically installed and kept up to date on the vast majority of supported devices.

Before starting an AR session, apps must:

  1. Check that ARCore is supported, by calling ARSubsystemManager.systemState.
  2. Check that Google Play Services for AR is installed and up to date, and that required ARCore device profile data has been downloaded, by calling ARSubsystemManager.Install().

Create a new project and install the ARCore Extensions package

  1. Download the latest arcore-unity-extensions-*.tgz from the GitHub releases page.

  2. Open Unity and create a new 3D project.

  3. Import ARCore Extensions into your project:

    1. Open the Package Manager (choose Window > Package Manager).

    2. In the top left corner of the Package Manager, click the + (plus) button. Choose Add package from tarball…

      Add package from tarball… in Unity Package Manager

    3. Locate the downloaded arcore-unity-extensions-*.tgz tarball, then click Open.

    4. Wait a moment while Unity installs this and dependent packages into your project.

Configure your app to be AR Required or AR Optional

An app that supports AR features can be configured in two ways: AR Required and AR Optional. If you need help deciding which one to choose, see Publish AR Apps in the Google Play Store.

Make an app AR required

To be usable, an AR Required app requires an ARCore supported device that has Google Play Services for AR installed on it, and has up to date ARCore device profile data.

  • 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, or ARCore device profile data is not up to date.

To make an app AR Required:

  1. Create an ARCore settings instance by navigating to Edit > Project Settings > XR > ARCore and clicking Create.

  2. Make sure that the Edit > Project Settings > XR > ARCore > Requirement > Required menu item is checked as shown below. It is checked by default.

By default your app will automatically perform runtime checks to ensure that the device supports ARCore, that Google Play Services for AR is installed, and that ARCore device profile data is up to date, specifically:

  1. If Google Play Services for AR 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.
  2. If ARCore device profile data is not up to date, your app will download it.

To disable these default checks, set ARSession.attemptUpdate to false, and continue to perform all necessary runtime checks.

Make an app AR Optional

An AR Optional app has optional AR features, which are activated only on devices that has 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.

To make an app AR Optional:

  • Check the Edit > Project Settings > XR > ARCore > Requirement > Optional menu item.

Perform runtime checks

If your app is AR Optional, use ARSession.state, which returns an ARSessionState, to check whether the device supports ARCore and, if so, whether Google Play Services for AR and ARCore device profile data are installed and up to date.

Your app should 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.

User Privacy Requirements

Make sure your app complies with ARCore's User Privacy Requirements.

Next Steps

Read the code in the sample app and ARCore Extensions reference.