Unity AR Foundation is a cross-platform framework from Unity Technologies that lets developers build augmented reality (AR) apps once and deploy them to both Android (ARCore) and iOS (ARKit) devices. It provides a unified C# API that abstracts the underlying AR SDKs, so you can create AR experiences without writing platform-specific code for each device.
Background: Why AR Foundation Was Created
Before AR Foundation, Unity developers had to choose between ARKit (Apple) and ARCore (Google) and write separate codebases for each. That meant maintaining two projects, two sets of plugins, and two different APIs. Unity created AR Foundation to solve this duplication by offering a single layer that sits on top of both ARKit and ARCore. It was first introduced in 2018 as a preview package, and it has since become the standard way to build AR apps in Unity. The framework is part of Unity’s package manager, so it can be added to any project without a separate download.
How AR Foundation Works
AR Foundation doesn’t do the heavy lifting itself; instead, it wraps the native AR capabilities of ARCore and ARKit. When you build your project, Unity automatically includes the correct native plugin for the target platform. The framework exposes a set of components that you add to your scene:
- AR Session – controls the AR session’s lifecycle (start, pause, resume).
- AR Session Origin – handles the transformation between the real world and the virtual world.
- AR Camera – replaces the default camera to render the real-world feed.
- AR Plane Manager – detects horizontal and vertical surfaces.
- AR Point Cloud Manager – provides low-level feature points for tracking.
- AR Anchor Manager – places virtual objects at fixed real-world positions.
These components communicate with the native SDKs through a scripting layer. For example, when you enable plane detection, AR Foundation calls ARCore’s or ARKit’s plane detection API, receives the results, and creates GameObjects in your scene that match the detected planes.
Choosing Between AR Foundation, ARKit, and ARCore
If you’re only targeting one platform, you might wonder whether to use AR Foundation or the native SDK directly. Here are the key factors:
- Cross-platform need – If you plan to release on both iOS and Android, AR Foundation saves significant time.
- Feature access – Native SDKs sometimes get new features before AR Foundation supports them. If you need bleeding-edge features immediately, you may need to use the native SDK or wait for an AR Foundation update.
- Team skills – If your team knows C# and Unity well, AR Foundation is easier. If they’re native iOS/Android developers, they might prefer ARKit/ARCore directly.
- Maintenance – One codebase is easier to maintain than two, but you must keep up with AR Foundation’s release cycle.
In practice, most Unity AR developers choose AR Foundation because it covers the majority of use cases and keeps the door open for future platforms (like ARCore on other devices or even Windows Mixed Reality).
Common Problems and How to Avoid Them
Developers often run into a few recurring issues with AR Foundation:
- Build failures – Missing ARCore or ARKit packages can cause errors. Always install the required packages for each platform from Unity’s Package Manager.
- Tracking loss in low light – AR Foundation relies on camera tracking; in dark environments, it may lose tracking. You can add a warning UI or use a flashlight prompt.
- Plane detection not working – Make sure you’ve enabled plane detection in the AR Plane Manager and that the device supports it. Also, some surfaces (like white walls) are hard to detect.
- Performance issues – AR apps are resource-intensive. Use occlusion only when necessary, and keep the polygon count low.
A common misconception is that AR Foundation works on all devices. In reality, it only works on devices that support ARCore or ARKit. On unsupported devices, your app will either crash or show an error. You should check the device compatibility lists from Google and Apple.
Costs and Requirements
AR Foundation itself is free. The cost comes from Unity’s licensing: if your company earns over $200,000 in revenue or funding in the last 12 months, you need a Unity Pro subscription (currently around $2,040 per year). For individuals and small businesses below that threshold, Unity Personal is free. Additionally, you’ll need a device that supports AR (most modern smartphones) and, for iOS development, a Mac with Xcode. There are no per-install fees or royalties from AR Foundation itself.
Alternatives to AR Foundation
If AR Foundation doesn’t fit your needs, there are alternatives:
- Native ARKit/ARCore – Full control, but you must write platform-specific code.
- Vuforia – A commercial AR SDK that works with Unity and supports image recognition and object tracking. It has a free tier with a watermark.
- EasyAR – A free alternative that supports multiple platforms, but its features are more limited.
- RealityKit (iOS only) – Apple’s high-level framework, but it’s not cross-platform.
For most Unity developers, AR Foundation is the best balance of features and effort, but if you need specialized tracking (like industrial markers), Vuforia might be better.
Frequently Asked Questions
Does AR Foundation work with Unity’s ARCore and ARKit simultaneously?
Yes. AR Foundation is designed to work with both. You build the same project, and Unity includes the appropriate native plugin for each platform. You don’t need to write separate code, but you must install both ARCore and ARKit packages in your project.
Can I use AR Foundation for location-based AR (like Pokémon GO)?
AR Foundation itself doesn’t handle GPS. You would combine it with Unity’s Location Services or a mapping SDK like Mapbox. The AR part handles the camera and tracking, while the location part determines where to place virtual objects in the real world.
Is AR Foundation free for commercial use?
Yes, AR Foundation is free. The only cost is Unity’s licensing, which is free for small businesses (under the revenue threshold) and paid for larger ones. There are no additional fees for using AR Foundation in a commercial product.
What is the difference between AR Foundation and ARCore/ARKit?
ARCore and ARKit are the underlying SDKs from Google and Apple. AR Foundation is a Unity wrapper that unifies them. You can think of AR Foundation as a translation layer: you write code in C#, and it gets converted to ARCore or ARKit calls depending on the platform.
Can I use AR Foundation for face tracking?
Yes, AR Foundation supports face tracking on both iOS and Android devices that have a depth-capable front camera. You can use the ARFaceManager component to detect faces and place virtual objects on them, like masks or glasses.
Does AR Foundation support Android’s ARCore and iOS’s ARKit on all devices?
No. It only works on devices that support ARCore or ARKit. Google maintains a list of ARCore-certified devices, and Apple supports ARKit on iPhones and iPads with A9 chips or later. Always check compatibility before releasing.
Related
- Hera Marker Quilting: How to Use One
- Aphrodite’s Group Lake District? Explained
- Hephaestus Domain and Attributes Explained
How pages are sourced and corrected: Sources and editorial policy.