Image tracking platform support
Learn about the features of image tracking in AR Foundation and which platforms support them.
The AR Foundation XRImage
Provider plug-in | Image tracking supported | Provider documentation |
---|---|---|
Google ARCore XR Plug-in | Yes | Image tracking (ARCore) |
Apple ARKit XR Plug-in | Yes | Image tracking (ARKit) |
Apple visionOS XR Plug-in | Yes | N/A |
Microsoft HoloLens | ||
Unity OpenXR: Meta | ||
Unity OpenXR: Android XR | ||
XR Simulation | Yes | Image tracking (XR Simulation) |
Check for image tracking support
Your app can check at runtime whether a provider plug-in supports image tracking on the user's device. Use the following example code to check whether the device supports image tracking:
void Start()
{
if (LoaderUtility
.GetActiveLoader()?
.GetLoadedSubsystem<XRImageTrackingSubsystem>() != null)
{
// XRImageTrackingSubsystem was loaded. Image tracking is supported.
}
}
Note
This example code assumes that your app has already initialized XR.
By default XR initializes automatically when your app starts, but this is configurable via Project Settings > XR Plug-in Management > Initialize XR on Startup. Refer to the XR Plug-in Management End-user documentation for more detailed information about managing the XR Plug-in lifecycle.
Optional features
The following table lists the optional features of the image tracking subsystem. Each optional feature is defined by a Descriptor Property of the XRImage
Feature | Descriptor Property | Description |
---|---|---|
Moving images | supports |
Whether the subsystem supports tracking the poses of moving images in real time. |
Requires physical image dimensions | requires |
Whether the subsystem requires physical image dimensions to be provided for all reference images. If False , specifying the physical dimensions is optional. |
Mutable library | supports |
Whether the subsystem supports Mutable |
Image validation | supports |
Whether the subsystem supports image validation (validating images before they are added to a Mutable |
Optional feature platform support
The following table lists whether certain XR plug-in providers support each optional feature:
Feature | ARCore | ARKit | VisionOS | XR Simulation |
---|---|---|---|---|
Moving images | Yes | iOS 12+ | Yes | Yes |
Requires physical image dimensions | Yes | |||
Mutable library | Yes | Yes | Yes | Yes |
Image validation | Yes | iOS 13+ | Yes | Yes |
Check for optional feature support
Your app can check at runtime whether an image tracking provider supports any optional features on the user's device. The XRImage
Refer to the following example code to learn how to check for optional feature support:
void CheckForOptionalFeatureSupport()
{
// This is inefficient. You should re-use a saved reference instead.
var manager = Object.FindAnyObjectByType<ARTrackedImageManager>();
// Use manager.descriptor to determine which optional features
// are supported on the device. For example:
if (manager.descriptor.supportsMovingImages)
{
// Moving images are supported.
}
}
Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.