AR Foundation is a cross-platform augmented reality framework for Unity that exposes plane detection, image tracking, anchors, raycasts, occlusion and other AR features through one common set of components, while platform-specific provider plug-ins do the actual tracking on each device. In XR development, it sits between application code and native SDKs such as ARKit and ARCore, so a team can write the AR logic once and deploy it to phones, tablets and mixed reality headsets.
AR Foundation does not implement computer vision itself. It defines abstract subsystems and data types, and each provider fills them with results from the platform runtime. That design gives portability, but it also means that feature availability always depends on the provider and the hardware underneath it.
How AR Foundation connects Unity to native AR runtimes
AR Foundation works as a layered architecture: application scripts talk to managers, managers talk to subsystems, and subsystems are implemented by provider packages. Unity’s XR Plug-in Management decides which provider loads for each build target, so the same scene can use ARKit on iOS and ARCore on Android without code changes.
Two scene objects form the backbone. The AR Session controls the lifecycle of the AR experience, including availability checks, pause and reset. The XR Origin (called AR Session Origin in versions before 5.0) holds the camera and converts session space into Unity world space, so detected planes and anchors appear at the correct position, rotation and scale.
The table below shows the layers a request passes through when a script asks for detected planes.
| Layer | Example | Responsibility |
|---|---|---|
| Application code | Placement script | Game or business logic |
| Trackable managers | ARPlaneManager | Create and update GameObjects for trackables |
| Subsystems | XRPlaneSubsystem | Platform-neutral interface and data structs |
| Provider plug-ins | Apple ARKit XR Plug-in | Translate native results into subsystem data |
| Native runtime | ARKit, ARCore, OpenXR | Camera tracking, SLAM, scene analysis |
Trackables, managers and their lifecycle
A trackable is anything the device detects and follows in the physical world, such as a plane, a tracked image, a face or an anchor. Each trackable type has a dedicated manager component that instantiates a GameObject when the runtime reports a new item, updates its pose, and removes it when tracking is lost for good.
Since AR Foundation 6, every manager raises a unified trackablesChanged event with added, updated and removed lists, replacing older type-specific events. Each trackable also carries a tracking state of Tracking, Limited or None, which applications should check before trusting a pose.
The most common managers and the feature each one exposes are listed below.
| Manager | Feature | Typical use |
|---|---|---|
| ARPlaneManager | Horizontal and vertical planes | Placing furniture or game boards |
| ARRaycastManager | Hit tests against trackables | Tap-to-place interactions |
| ARAnchorManager | Fixed points in space | Keeping content stable over time |
| ARTrackedImageManager | Reference image detection | Posters, packaging, printed markers |
| AROcclusionManager | Depth and human segmentation | Hiding virtual objects behind real ones |
| ARMeshManager | Environment meshing | Physics and occlusion on room geometry |
| ARFaceManager | Face pose and mesh | Filters and facial try-on |
Platform support and provider differences
AR Foundation reports what a device can do through subsystem descriptors, and support is uneven across providers. A feature that works on an iPhone with a LiDAR scanner may be missing entirely on a mid-range Android phone or limited on a headset, so applications must query capabilities at runtime instead of assuming them.
The following comparison summarizes typical support across the main providers; exact coverage changes with package versions and device generations.
| Feature | ARKit (iOS) | ARCore (Android) | OpenXR headsets |
|---|---|---|---|
| Plane detection | Yes | Yes | Yes, on most runtimes |
| Image tracking | Yes | Yes | Limited |
| Meshing | LiDAR devices only | No | Yes, on some headsets |
| Face tracking | Yes, front camera | Yes, front camera | No |
| Body tracking | Yes | No | No |
| Environment probes | Yes | Yes | No |
Headset support arrives mostly through the OpenXR Plug-in with vendor feature groups, for example the Meta OpenXR package for Quest devices and the Android XR provider. Apple Vision Pro uses a separate visionOS provider, often combined with PolySpatial for shared-space applications.
How AR Foundation compares with related XR tools
AR Foundation is an engine-level abstraction, not a runtime standard. OpenXR defines an industry API that runtimes implement, while AR Foundation is a Unity package that can sit on top of OpenXR or on top of proprietary SDKs. The comparison clarifies where each tool belongs.
| Technology | Scope | Main difference |
|---|---|---|
| AR Foundation | Unity package | One API over several AR providers |
| ARKit / ARCore | Native platform SDKs | Full feature depth on one platform |
| OpenXR | Khronos runtime standard | Engine-independent device API |
| Unity XR Interaction Toolkit | Unity package | Input and interaction, not tracking |
| WebXR | Browser API | Runs AR on the web without an app |
In practice, AR Foundation and the XR Interaction Toolkit are often used together: the first supplies planes, raycasts and anchors, and the second handles grabbing, selecting and placing objects with touch or controllers.
Practical setup and development workflow
A typical project installs the AR Foundation package, then one provider per target platform, and enables the providers in XR Plug-in Management. Versions must match: AR Foundation 6 pairs with Unity 6 and the matching provider versions, and mixing major versions usually causes compile errors or missing subsystems.
- Add an AR Session and an XR Origin to the scene, then attach only the managers the feature set needs.
- Use XR Simulation in the Unity Editor to test plane and image detection against virtual rooms before deploying to a device.
- Check session state and descriptors at startup, and show fallback UI when a feature is unsupported or ARCore services need installation.
- Disable managers that are not needed, because every active subsystem costs CPU, GPU and battery.
Limitations and common mistakes
The main trade-off of AR Foundation is portability against depth. Newer platform features, such as particular geospatial or scene semantics capabilities, often reach native SDKs first and appear in AR Foundation later or only through provider-specific extensions.
| Symptom | Likely cause | Fix |
|---|---|---|
| No planes appear | Provider not enabled for the target | Enable it in XR Plug-in Management |
| Content drifts | Objects not attached to anchors | Parent content to an ARAnchor |
| Wrong scale or offset | Content placed outside XR Origin space | Use the origin’s transform hierarchy |
| Feature silently missing | Unsupported on that device | Check descriptors and provide a fallback |
| Low frame rate | Too many active managers | Disable unused subsystems |
A frequent misconception is that AR Foundation guarantees identical behavior on every device. It guarantees a shared interface, but tracking quality, plane boundaries and depth accuracy still reflect the underlying sensors and algorithms.
Put simply
AR Foundation is like a universal adapter for augmented reality in Unity. Apple phones, Android phones and headsets each understand the real world in their own way. AR Foundation lets a developer ask simple questions, such as where the floor is, and passes each question to whichever device is running the app.
The key takeaway is that developers write the app once, but each device still decides how much it can see and track.
In practice
A small studio builds a furniture preview app for a regional retailer that wants the same experience on iPhone and Android. The team uses AR Foundation with the ARKit and ARCore providers, an ARPlaneManager for floor detection and an ARRaycastManager for tap-to-place. Each placed sofa is attached to an anchor so that it stays fixed while the customer walks around it.
On iPhones with a LiDAR scanner, the team enables meshing and occlusion so that a real coffee table hides part of the virtual sofa. On Android devices without depth support, the app checks descriptors and skips occlusion. The result is one shared codebase covering both platforms, with about 90 percent of the scripts identical and only a few capability checks differing.