Unity AR Foundation Example: Building Augmented Reality Apps Made Easy

Robert Jul 13, 2026

Imagine creating immersive augmented reality (AR) experiences with ease. Unity's AR Foundation makes this possible by providing a comprehensive framework for building AR apps. But where do you start? Let's explore Unity AR Foundation through an example project.

Getting started with AR object placement in Unity
Getting started with AR object placement in Unity

AR Foundation simplifies AR development by abstracting platform-specific functionality, making it easier to create cross-platform AR experiences. It's based on Unity's past AR plugins, including Vuforia and ARKit/ARCore.

AR Throwing — Unity Asset (AR Foundation: ARKit, ARCore) #GameDev #AR #Unity
AR Throwing — Unity Asset (AR Foundation: ARKit, ARCore) #GameDev #AR #Unity

Project Setup

To begin with Unity AR Foundation, create a new 3D project. In the Import Packagedialogue that follows, select AR Foundation.

Client Challenge
Client Challenge

After importing, you'll notice two new folders in your Project window: XR and AR Foundation. XR contains the functionality that works across all AR platforms, while AR Foundation holds platform-specific assets.

Setting Up the AR Scene

Augmented Reality (Vuforia AR)- Unity 3D[Tutorial][C#]
Augmented Reality (Vuforia AR)- Unity 3D[Tutorial][C#]

Create a new scene and switch to the AR Foundation's XR Prefab. This prefab includes a camera and a plane detector for world tracking.

Drag and drop the XR Prefab into your new scene. Unity will register the Prefab's AR session as the default for your scene. Now, your scene is set up for AR, and you're ready to add AR functionality.

Adding AR Elements

unity-andrewc - Overview
unity-andrewc - Overview

To add AR elements to your scene, you can use the AR Plane Manager. It manages detected planes and allows you to place objects on them. Create a new AR Plane Manager in your scene to start detecting planes.

Now, you can spawn objects on these detected planes. For example, drag and drop a simple 3D object (like a cube) into your hierarchy. Create a new C# script that utils the AR Foundation's APIs to spawn this cube on detected planes.

Platform-Specific Implementation

two different views of trees in the same direction
two different views of trees in the same direction

While AR Foundation abstracts many platform-specific details, some aspects need platform-specific handling. That's where the AR Foundation's platform-specific folders come in.

For instance, if you're targeting Android, you'll use ARCore. In the AR Foundation folder, navigate to the AR Core -> Android folder. Here, you'll find scripts and resources tailored for Android AR.

How I Improve the Graphics in Unity! (Tutorial)
How I Improve the Graphics in Unity! (Tutorial)
an abstract black and white logo
an abstract black and white logo
Unity Essentials - Unity Connect
Unity Essentials - Unity Connect
ankur-unity - Overview
ankur-unity - Overview
Getting started with Unity Editor
Getting started with Unity Editor
Unity Game Engine 🎮⚡ (Complete Learning Guide)
Unity Game Engine 🎮⚡ (Complete Learning Guide)
BUILD LEVELS QUICKLY in Unity with SNAPS!
BUILD LEVELS QUICKLY in Unity with SNAPS!
Getting started with AR in Unity
Getting started with AR in Unity
How to Make a Simple Game in Unity 3D
How to Make a Simple Game in Unity 3D
Unity Game Asset Animation Tutorial
Unity Game Asset Animation Tutorial
ProBuilder Unity | Introduction
ProBuilder Unity | Introduction
Unity Good Graphics Tutorial
Unity Good Graphics Tutorial
Unity 5 Tutorial - Basic Glass with the Standard Shader
Unity 5 Tutorial - Basic Glass with the Standard Shader
FULL 3D ENEMY AI in 6 MINUTES! || Unity Tutorial
FULL 3D ENEMY AI in 6 MINUTES! || Unity Tutorial
Unity 5 - Artificial Intelligence / Basic AI - Part 02
Unity 5 - Artificial Intelligence / Basic AI - Part 02
AR Throwing ⭐ Unity & Augmented Reality — Unity Asset
AR Throwing ⭐ Unity & Augmented Reality — Unity Asset
How to make a Minimap in Unity
How to make a Minimap in Unity
Unity Character Customization with Blendshapes - Part 1/4
Unity Character Customization with Blendshapes - Part 1/4
Introduction to Unity: Getting Started – Part 1/2
Introduction to Unity: Getting Started – Part 1/2
Tutorial: Implementing a Minimap in Unity - The Knights of U
Tutorial: Implementing a Minimap in Unity - The Knights of U

Using ARCore Examples

ARCore provides functionality like point cloud detection, and plane detection. To use these, import the necessary scripts and manage the ARCore Session.

In your C# script, use the ARCore Origin script to manage the ARCore session. ARCore Session provides services like plane detection, point cloud data, and more. Each of these services has its own API for Unity developers to utilize.

iOS ARKit Specifics

Similarly, for iOS, ARKit is used. In the AR Foundation folder, navigate to AR Kit -> iOS. Here, you'll find resources and scripts for ARKit-based AR experiences.

ARKit provides features like human pose detection, object scanning, and more. To use these features, refer to Apple's ARKit documentation and use the ARKit-specific scripts and APIs provided.

With this example, you've seen how Unity AR Foundation simplifies AR development by providing a common framework for various AR platforms. Now, you're ready to build your own AR app with Unity AR Foundation.