AR Fundamentals: Plane Detection

AR Fundamentals: Plane Detection


Source: GitHub

What is Augmented Reality?

While scrolling through Instagram (or Tik Tok), you may have come across the “gibberish game” or the “name-place-animal-thing challenge”; or have you ever played the game “Pokémon Go”?

If you have, then you probably already know what Augmented Reality is. Augmented Reality (AR) can be defined as any technology that “enhances” or “augments” your experience of the world around you.

Filters and games are just a few examples of how AR is used. The applications of AR tech are limitless, it is used for interior design, for education, for marketing, by Car mechanics, in Medical training and much more.

Getting started with AR

In this article, I will help you get started with AR development by explaining the implementation of Plane detection (and tracking)with various SDKs (Software Development Kits) using Unity.

The first thing you need to do is install Unity Hub from here. (Tip: If you are enrolled in the GitHub Developer Program Member program, you can use the Unity Student plan for free).

Next, choose a version of Unity.

A LTS(Long Term Support) version is more stable and hence better for beginners.

Be sure to select the Android Build Support option.

Now that you have installed Unity, create a project with the “3d” template.

Once the scene is rendered, a few steps need to be followed before we can start.

Step 1: Go to File -> Build Settings

Step 2: Select Android and switch platform.

Step 3: Open Player Settings and change “Graphics API” to “OpenGLES3” and change “Minimum API Level” to “API level 24”.

Step 4: Click on XR Plugin Management and select AR Core.

Step 5: Open Window-> Package Manager, and install the following packages.

There are many ways to implement plane detection in Unity, but I will explain a method in which no code is required.

The first thing, we need to do is remove the “Main Camera” from the Hierarchy.

Then right click in the Hierarchy to see the following options.

Select XR and import the following:

Select AR Session Origin and make the following changes.

Again we open File -> Build Settings.

Before we “Build and Run the project”.

Open “Developer settings” on your Android device and enable “USB Debugging” and then connect it to your PC.

We can now Build and Run our project.

Congratulations! You have built your first AR project 🥳.


GitHub Repository: https://github.com/Thamanmuthappa/PlaneDetection


If you were unable to run the project, feel free to reach out to me at:

LinkedIn: https://www.linkedin.com/in/thaman-muthappa-m-n-540982204/

GitHub: https://github.com/Thamanmuthappa

Instagram: https://www.instagram.com/t_man.__/

Email: thamanmuthappa@gmail.com