Google ARCore XR Plug-in
Use the Google ARCore XR Plug-in package to enable ARCore support in your AR Foundation project. This package implements the following AR Foundation features using ARCore 1.31:
|Enable, disable, and configure AR on the target platform.
|Track the device's position and rotation in physical space.
|Render images from device cameras and perform light estimation.
|Detect and track surfaces.
|Detect and track 2D images.
|Detect and track human faces.
|Detect and track feature points.
|Cast rays against tracked items.
|Track arbitrary points in space.
|Generate cubemaps of the environment.
|Occlude AR content with physical objects and perform human segmentation.
This package does not implement the following AR Foundation features as they are not supported by ARCore 1.31:
|Detect and track 3D objects.
|Detect and track a human body.
|Generate meshes of the environment.
|Track other devices in a shared AR session.
Install the Google ARCore XR Plug-in
When you enable the Google ARCore XR Plug-in in Project Settings > XR Plug-in Management, Unity automatically installs this package (if necessary). See Enable the ARCore 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 ARCore applications.
You can define ARCore as either required or optional in Android apps. By default, ARCore is required, which means your app can only be installed on AR-supported devices. If you specify that AR is optional, your app can be installed on all Android devices.
See Set the ARCore support Requirement for instructions on how to change this setting.
The Google ARCore 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 Google ARCore XR Plug-in.
In most cases, you should use the scripts, prefabs, and assets provided by the AR Foundation package as the basis for your handheld AR apps rather than using ARCore APIs directly. The Google ARCore XR Plug-in supports AR Foundation features on the Android platform by implementing the native endpoints required to target Google’s ARCore platform using Unity's multi-platform XR API.
Use the Google ARCore XR Plug-in APIs when you need access to Android ARCore-specific features. The ARCoreFaceRegions sample in the AR Foundation Samples repository provides an example of using an ARCore feature.
This version of Google ARCore XR Plug-in is compatible with the following versions of the Unity Editor:
- Color Temperature in degrees Kelvin is not currently supported.
- The XROcclusionSubsystemDescriptor properties supportsEnvironmentDepthImage and supportsEnvironmentDepthConfidenceImage require a session before support can be determined. If there is no session, then these properties return
false. They might return
truelater when a session has been established.
This version of Google ARCore XR Plug-in includes:
- A shared library which provides implementation of the XR Subsystems listed above
- A shader used for rendering the camera image
- A plug-in metadata file