AR Foundation

On this page 8

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.

LayerExampleResponsibility
Application codePlacement scriptGame or business logic
Trackable managersARPlaneManagerCreate and update GameObjects for trackables
SubsystemsXRPlaneSubsystemPlatform-neutral interface and data structs
Provider plug-insApple ARKit XR Plug-inTranslate native results into subsystem data
Native runtimeARKit, ARCore, OpenXRCamera tracking, SLAM, scene analysis
Layers of the AR Foundation stack

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.

ManagerFeatureTypical use
ARPlaneManagerHorizontal and vertical planesPlacing furniture or game boards
ARRaycastManagerHit tests against trackablesTap-to-place interactions
ARAnchorManagerFixed points in spaceKeeping content stable over time
ARTrackedImageManagerReference image detectionPosters, packaging, printed markers
AROcclusionManagerDepth and human segmentationHiding virtual objects behind real ones
ARMeshManagerEnvironment meshingPhysics and occlusion on room geometry
ARFaceManagerFace pose and meshFilters and facial try-on
Core AR Foundation managers

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.

FeatureARKit (iOS)ARCore (Android)OpenXR headsets
Plane detectionYesYesYes, on most runtimes
Image trackingYesYesLimited
MeshingLiDAR devices onlyNoYes, on some headsets
Face trackingYes, front cameraYes, front cameraNo
Body trackingYesNoNo
Environment probesYesYesNo
Typical feature support by provider

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.

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.

TechnologyScopeMain difference
AR FoundationUnity packageOne API over several AR providers
ARKit / ARCoreNative platform SDKsFull feature depth on one platform
OpenXRKhronos runtime standardEngine-independent device API
Unity XR Interaction ToolkitUnity packageInput and interaction, not tracking
WebXRBrowser APIRuns AR on the web without an app
AR Foundation and neighboring technologies

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.

SymptomLikely causeFix
No planes appearProvider not enabled for the targetEnable it in XR Plug-in Management
Content driftsObjects not attached to anchorsParent content to an ARAnchor
Wrong scale or offsetContent placed outside XR Origin spaceUse the origin’s transform hierarchy
Feature silently missingUnsupported on that deviceCheck descriptors and provide a fallback
Low frame rateToo many active managersDisable unused subsystems
Frequent problems and fixes

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.