Apple ARKit XR Plug-in
Use the Apple ARKit XR Plug-in package to enable ARKit support in your AR Foundation project. This package implements the following AR Foundation features:
|Session||Enable, disable, and configure AR on the target platform.|
|Device tracking||Track the device's position and rotation in physical space.|
|Camera||Render images from device cameras and perform light estimation.|
|Plane detection||Detect and track surfaces.|
|Image tracking||Detect and track 2D images.|
|Object tracking||Detect and track 3D objects.|
|Face tracking||Detect and track human faces.|
|Body tracking||Detect and track a human body.|
|Point clouds||Detect and track feature points.|
|Raycasts||Cast rays against tracked items.|
|Anchors||Track arbitrary points in space.|
|Meshing||Generate meshes of the environment.|
|Environment probes||Generate cubemaps of the environment.|
|Occlusion||Occlude AR content with physical objects and perform human segmentation.|
|Participants||Track other devices in a shared AR session.|
Apple's App Store rejects any app that contains certain face tracking-related symbols in its binary if the app developer doesn't intend to use face tracking. To avoid ambiguity, face tracking support is available only when face tracking is enabled. See Enable the Face tracking subsytem for instructions for changing this setting.
Install the Apple ARKit XR Plug-in
When you enable the Apple ARKit XR Plug-in in Project Settings > XR Plug-in Management settings, Unity automatically installs this package (if necessary). See Enable the ARKit plug-in for instructions.
You can also install and uninstall this package using the Package Manager. Installing through the Package Manager does not automatically enable the plug-in. You must still enable it in Project Settings > XR Plug-in Management.
See Project configuration for information about the project settings that affect ARKit apps.
The Apple ARKit XR Plug-in implements the native iOS endpoints required for building Handheld AR apps using Unity's multi-platform XR API. However, this package doesn't expose any public scripting interface of its own. In most cases, you should use the scripts, Prefabs, and assets provided by AR Foundation as the basis for your Handheld AR apps.
Including the Apple ARKit XR Plug-in also includes source files, static libraries, shader files, and plug-in metadata.
ARKit requires iOS 11.0. Some specific features require later versions (see below).
You can define ARKit as either required or optional in iOS apps. By default, ARKit is required, which means your app can only be installed on AR-supported devices and operating systems (iOS 11.0 and above). If you specify that AR is optional, your app can also be installed on iOS devices that don't support ARKit.
See Set the ARKit support Requirement for instructions on how to change this setting.
Apple ARKit XR Plug-in package supports project validation. Project validation is a set of rules that the Unity Editor checks to detect possible problems with your project's configuration. See Project Validation section for more information about the rules checked for Apple ARKit XR Plug-in.
This version of Apple ARKit XR Plug-in is compatible with the following versions of the Unity Editor:
You must use Xcode 14 or later when compiling an iOS Player that includes this package.
- Color correction is not available as an RGB Value (only as color temperature).
This version of Apple ARKit XR Plug-in includes:
- A static library which provides implementation of the XR Subsystems listed above
- An Objective-C source file
- A shader used for rendering the camera image
- A plug-in metadata file
For more code examples, see the AR Foundation Samples repo.
* Apple and ARKit are trademarks of Apple Inc., registered in the U.S. and other countries and regions.