Quickstart for Android

Get started with targeting your ARCore Unity apps to Android.

This guide shows you how to set up your development environment and try out an ARCore sample app.

Requirements

You'll need:

Hardware

  • An ARCore supported phone

  • A USB cable to connect your phone to your development machine

Software

Get the ARCore SDK for Unity

  1. Download ARCore SDK for Unity 1.4.0 or later.
    The SDK is downloaded as file called arcore-unity-sdk-v1.4.0.unitypackage.

Create a new project and import the SDK

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

  2. Select Assets > Import Package > Custom Package.

  3. Select the arcore-unity-sdk-v1.4.0.unitypackage Unity Package that you downloaded above.

  4. In the Importing Package dialog, make sure that all package options are selected and click Import.

  5. Accept any API upgrades if prompted.

Open the sample scene

  1. In the Unity Project window, you can find the HelloAR sample in:
    Assets > GoogleARCore > Examples > HelloAR > Scenes.

Configure build settings

  1. Go to File > Build Settings to open the Build Settings window.
  2. Select Android and click Switch Platform.
  3. In the Build Settings window, click Player Settings.
  4. In the Inspector window, configure the following player settings:
    Setting Value
    Player Settings > Other Settings > Multithreaded Rendering Disable
    Player Settings > Other Settings > Package Name Create a unique app ID using a Java package name format.
    For example, use com.example.helloAR
    Player Settings > Other Settings > Minimum API Level Android 7.0 or higher
    Player Settings > Other Settings > Target API Level Android 7.0 or higher
    Player Settings > XR Settings > ARCore Supported Enable

Build and run the sample app

  1. Enable developer options and USB debugging on your phone.

  2. Connect your phone to your development machine.

  3. In the Unity Build Settings window, click Build and Run.
    Unity builds your project into an Android APK, installs it on your phone, and launches it.

  4. Move your phone around until ARCore starts detecting and visualizing planes.

  5. Tap a plane to put an Andy Android object on it.

  6. (Optional) Use Android Logcat to view log messages or Android Device Monitor to analyze the device more comprehensively.

Next Steps

  • Step through the HelloAR code in the HelloAR Sample App Tour.
  • Learn how to Enable ARCore in your app.
  • Use Augmented Images to build apps that can respond to 2D images, such as posters or logos, in the user's environment.
  • Target your apps to Android or iOS and use Cloud Anchors to create AR experiences that Android and iOS users can share.

Send feedback about...