DEV Community

Cover image for Setting Up Unity Editor for Android AR App Development: A Step-by-Step Guide
Dinesh A
Dinesh A

Posted on

Setting Up Unity Editor for Android AR App Development: A Step-by-Step Guide

Unity, the powerful real-time 3D development engine, empowers a collaborative effort between artists, designers, and developers to craft immersive and interactive experiences. In this article, we will guide you through the process of setting up the Unity editor to develop Augmented Reality (AR) applications for Android devices.

Let's dive into the steps:

Launch Unity Hub and Create a New Project:

  • Open Unity Hub and click on "New Project."
  • Select the "3D Core" template and give your project a name.
  • Click "Create Project" and allow Unity to initialize your project.

Creating new project

Configure Build Settings:

  • Navigate to "File > Build Settings."
  • Choose "Android" as your target platform and click "Switch Platform."

Configure Build Settings

Enable Unity Registry:

  • Head to "Windows > Package Manager."
  • Ensure that "Unity Registry" is checked.

Enable Unity Registry:

Install AR Foundation and Google AR Core XR Plugin:

  • Search for "AR Foundation" and install it.
  • Similarly, install the "Google AR Core XR Plugin."

Install AR Foundation and Google AR Core XR Plugin

Project Settings:

  • Go to "Edit > Project Settings."
  • Select "Player" from the left-side menu.
  • Provide your company name and product name.

Project Settings

Adjust Graphics Settings:

  • In the same window, navigate to "Other Settings."
  • Uncheck "Auto Graphics API" and remove "Vulkan" from the Graphics API list.

Adjust Graphics Settings

Set Minimum API Level:

  • Ensure that the "Minimum API Level" is set to "Android 7.0 - Nougat" (API level 24).

Set Minimum API Level

Configure Target Architecture:

  • In the same window, configure the "Scripting Backend" to IL2CPP.
  • Select the "Target Architectures" option and choose "ARM64."

Configure Target Architecture

Enable XR Plugin for AR:

  • In the Project Settings window, select "XR Plugin Management."
  • Check "Google AR Core" to enable it.

Enable XR Plugin for AR

Prepare the Scene:

  • Close the Project Settings window.
  • Delete the "Main Camera" from the Hierarchy.

Prepare the Scene

Set Up XR Components:

  • Right-click on the Hierarchy panel.
  • Select "XR > AR Session."

Set Up XR Components

Add XR Origin:

  • Right-click on the Hierarchy again.
  • Select "XR > XR Origin."

Add XR Origin

Add Scenes to Build Settings:

  • Go to "File > Build Settings."
  • In the Build Settings window, locate the "Scenes In Build" section.
  • Drag and drop your scene from the Hierarchy panel to add it to the list of scenes to build.

Add Scenes to Build Settings

With these steps completed, your fundamental setup for developing AR applications on Android devices is ready. You are now well-prepared to proceed with your AR development endeavors.

Top comments (0)