Google is committed to advancing racial equity for Black communities. See how.

GoogleARCore

Summary

Enumerations

ApkAvailabilityStatus{
  UnknownError = 0,
  UnknownChecking = 1,
  UnknownTimedOut = 2,
  UnsupportedDeviceNotCapable = 100,
  SupportedNotInstalled = 201,
  SupportedApkTooOld = 202,
  SupportedInstalled = 203
}
enum
Possible statuses of the Google Play Services for AR (ARCore) APK availability on a device.
ApkInstallationStatus{
  Uninitialized = 0,
  Requested = 1,
  Success = 100,
  Error = 200,
  ErrorDeviceNotCompatible = 201,
  ErrorAndroidVersionNotSupported = 202,
  ErrorUserDeclined = 203
}
enum
Possible statuses for a Google Play Services for AR (ARCore) installation request on this device.
AugmentedFaceMode{
  Disabled = 0,
  Mesh = 2
}
enum
Defines possible modes for AugmentedFace detection.
AugmentedFaceRegion{
  NoseTip = 0,
  ForeheadLeft = 1,
  ForeheadRight = 2
}
enum
Defines face regions for which the pose can be queried.
AugmentedImageTrackingMethod{
  NotTracking = 0,
  FullTracking = 1,
  LastKnownPose = 2
}
enum
Indicates whether an image is being tracked using the camera image, or is being tracked based on its last known pose.
CameraConfigDepthSensorUsage{
  RequireAndUse = 0x0001,
  DoNotUse = 0x0002
}
enum
Type of depth sensor usage for a camera config.
CameraConfigStereoCameraUsage{
  RequireAndUse = 0x0001,
  DoNotUse = 0x0002
}
enum
Type of stereo camera usage for a camera config.
CameraFocusMode{
  FixedFocus = 0,
  AutoFocus = 1
}
enum
Selects the desired focus mode of the camera.
CameraMetadataTag enum
This enum follows the layout of NdkCameraMetadataTags.
CloudAnchorMode{
  Disabled = 0,
  Enabled = 1
}
enum
Defines possible modes for ARCore Cloud Anchors.
DepthMode{
  Disabled = 0,
  Automatic = 1
}
enum
Desired depth mode.
DepthStatus{
  Success,
  InternalError,
  NotYetAvailable,
  NotTracking,
  IllegalState
}
enum
Status for an attempt to retrieve the current depth texture.
DetectedPlaneFindingMode{
  Disabled = 0,
  HorizontalAndVertical = 1,
  Horizontal = 2,
  Vertical = 3
}
enum
Selects the behavior of the plane detection subsystem.
DetectedPlaneType{
  HorizontalUpwardFacing = 0,
  HorizontalDownwardFacing = 1,
  Vertical = 2
}
enum
Simple summary of the normal vector of a plane.
DeviceCameraDirection{
  BackFacing = 0,
  FrontFacing = 1
}
enum
The direction the device camera used by the session is facing.
DisplayUvCoordinateType{
  BackgroundTexture,
  BackgroundImage,
  UnityScreen
}
enum
Types of UV coordinates used for the display.
FeaturePointOrientationMode{
  Identity = 0,
  SurfaceNormal = 1
}
enum
The orientation mode of the feature point.
InstantPlacementMode{
  Disabled = 0,
  LocalYUp = 2
}
enum
Indicates whether Instant Placement is enabled or disabled.
InstantPlacementPointTrackingMethod{
  NotTracking = 0x00,
  ScreenspaceWithApproximateDistance = 0x01,
  FullTracking = 0x02
}
enum
Tracking methods for InstantPlacementPoint.
LightEstimateState{
  NotValid,
  Valid
}
enum
Possible states for LightEstimate.
LightEstimationMode{
  Disabled = 0,
  AmbientIntensity = 1,
  EnvironmentalHDRWithoutReflections = 2,
  EnvironmentalHDRWithReflections = 3
}
enum
Defines possible modes for ARCore real-world light estimation.
LostTrackingReason{
  None = 0,
  BadState = 1,
  InsufficientLight = 2,
  ExcessiveMotion = 3,
  InsufficientFeatures = 4,
  CameraUnavailable = 5
}
enum
Describes the reason for a loss in motion tracking.
PlaybackResult{
  OK,
  ErrorSessionNotPaused,
  ErrorSessionUnsupported,
  ErrorPlaybackFailed
}
enum
Results from attempting to set playback dataset filepath.
PlaybackStatus{
  None,
  OK,
  IOError,
  FinishedSuccess
}
enum
Describes the current playback status.
RecordingResult{
  OK,
  ErrorInvalidArgument,
  ErrorRecordingFailed,
  ErrorIllegalState
}
enum
Results from recording methods.
RecordingStatus{
  None,
  OK,
  IOError
}
enum
Describes the current recording status.
SessionStatus{
  None = 0,
  Initializing = 1,
  Tracking = 100,
  LostTracking = 101,
  NotTracking = 102,
  FatalError = 200,
  ErrorApkNotAvailable = 201,
  ErrorPermissionNotGranted = 202,
  ErrorSessionConfigurationNotSupported = 203,
  ErrorCameraNotAvailable = 204,
  ErrorIllegalState = 205
}
enum
Possible states for the ARCore session.
TrackableHitFlags{
  None = 0,
  PlaneWithinPolygon = 1 << 0,
  PlaneWithinBounds = 1 << 1,
  PlaneWithinInfinity = 1 << 2,
  FeaturePoint = 1 << 3,
  FeaturePointWithSurfaceNormal = 1 << 4,
  Default = PlaneWithinPolygon | FeaturePointWithSurfaceNormal
}
enum
Flags representing categories of raycast hits.
TrackableQueryFilter{
  All,
  New,
  Updated
}
enum
A filter for trackable queries.
TrackingState{
  Tracking = 0,
  Paused = 1,
  Stopped = 2
}
enum
Possible tracking states for ARCore.

Classes

GoogleARCore.ARCoreBackgroundRenderer

Renders the device's camera as a background to the attached Unity camera component.

GoogleARCore.ARCoreCameraConfigFilter

The ARCoreCameraConfigFilter class derives a list of camera configurations available on the device at runtime.

GoogleARCore.ARCoreRecordingConfig

Configuration to record camera and sensor data from an ARCore session.

GoogleARCore.ARCoreSession

A component that manages the ARCore Session in a Unity scene.

GoogleARCore.ARCoreSessionConfig

Holds settings that are used to configure the session.

GoogleARCore.Anchor

Attaches a GameObject to an ARCore Trackable.

GoogleARCore.AndroidPermissionsManager

Manages Android permissions for the Unity application.

GoogleARCore.AsyncTask< T >

A class used for monitoring the status of an asynchronous task.

GoogleARCore.AugmentedFace

A face detected and trackable by ARCore.

GoogleARCore.AugmentedImage

An image in the real world detected and tracked by ARCore.

GoogleARCore.AugmentedImageDatabase

A database storing a list of images to be detected and tracked by ARCore.

GoogleARCore.AugmentedImageSrc

This class caches information and content about a Texture2D for use by ARCore on threads other than the main thread.

GoogleARCore.DetectedPlane

A planar surface in the real world detected and tracked by ARCore.

GoogleARCore.EnvironmentalLight

A component that automatically adjusts lighting settings for the scene to be inline with those estimated by ARCore.

GoogleARCore.FeaturePoint

A point in the real world tracked by ARCore.

GoogleARCore.Frame

Provides a snapshot of the state of ARCore at a specific timestamp associated with the current frame.

GoogleARCore.InstantPlacementPoint

Trackable Instant Placement point returned by Frame.RaycastInstantPlacement(float, float, float, TrackableHit).

GoogleARCore.Session

Represents an ARCore session, which is an attachment point from the app to the ARCore service.

GoogleARCore.SessionStatusExtensions

Extension methods for the SessionStatus enumeration.

GoogleARCore.Trackable

An object ARCore is tracking in the real world.

GoogleARCore.VersionInfo

Provides access to information about the current ARCore SDK runtime.

Structs

GoogleARCore.AndroidPermissionsRequestResult

Structure holding data summarizing the result of an Android permissions request.

GoogleARCore.AugmentedImageDatabaseEntry

An entry in a AugmentedImageDatabase.

GoogleARCore.CameraConfig

A configuration for ARCore accessing the device's camera sensor.

GoogleARCore.CameraImageBytes

An ARCore camera image with its data accessible from the CPU in YUV-420-888 format.

GoogleARCore.CameraIntrinsics

A struct to provide camera intrinsics in ARCore.

GoogleARCore.CameraMetadataRational

CameraMetadataRational follows the layout of ACameraMetadata_rational struct in NDK.

GoogleARCore.CameraMetadataValue

Struct to contain camera metadata's value.

GoogleARCore.DisplayUvCoords

Stores UV display coordinates for mapping the four corners of the display.

GoogleARCore.LightEstimate

An estimate of lighting conditions in the environment corresponding to an AR frame.

GoogleARCore.PointCloudPoint

A point in a point cloud.

GoogleARCore.TrackableHit

Contains information about a raycast hit against a physical object tracked by ARCore.

Interfaces

GoogleARCore.IAndroidPermissionsCheck

Interface for checking Android permission.

Namespaces

GoogleARCore.CrossPlatform

Enumerations

ApkAvailabilityStatus

 ApkAvailabilityStatus

Possible statuses of the Google Play Services for AR (ARCore) APK availability on a device.

Properties
SupportedApkTooOld

The device and Android version are supported, and a version of the Google Play Services for AR (ARCore) is installed, but that version is too old.

SupportedInstalled

Google Play Services for AR (ARCore) is supported, installed, and available to use.

SupportedNotInstalled

The device and Android version are supported, but Google Play Services for AR (ARCore) is not installed.

UnknownChecking

Google Play Services for AR (ARCore) is not installed, and a query has been issued to check if ARCore is supported on this device.

UnknownError

An internal error occurred while determining Google Play Services for AR (ARCore) availability.

UnknownTimedOut

Google Play Services for AR (ARCore) is not installed, and the query to check if ARCore is supported timed out.

This may be due to the device being offline.

UnsupportedDeviceNotCapable

Google Play Services for AR (ARCore) is not supported on this device.

ApkInstallationStatus

 ApkInstallationStatus

Possible statuses for a Google Play Services for AR (ARCore) installation request on this device.

Properties
Error

An internal error occurred while installing Google Play Services for AR (ARCore).

ErrorAndroidVersionNotSupported

The device and Android version are supported, and a version of the Google Play Services for AR (ARCore) is installed, but the ARCore version is too old.

ErrorDeviceNotCompatible

The device is not currently compatible with Google Play Services for AR (ARCore).

ErrorUserDeclined

The user declined installation of the Google Play Services for AR (ARCore) during this run of the application and the current request was not marked as user-initiated.

Requested

Installation of Google Play Services for AR (ARCore) was requested.

The current activity will be paused.

Success

Google Play Services for AR (ARCore) is already installed.

Uninitialized

Installation of Google Play Services for AR (ARCore) was not initialized.

AugmentedFaceMode

 AugmentedFaceMode

Defines possible modes for AugmentedFace detection.

Properties
Disabled

A mode where AugmentedFace detection is disabled.

Mesh

A mode where AugmentedFace detection performs face pose, region pose, and face mesh estimation.

AugmentedFaceRegion

 AugmentedFaceRegion

Defines face regions for which the pose can be queried.

Left and right of an Augmented Face are defined relative to the person that the mesh belongs to.

Properties
ForeheadLeft

A region around the left forehead of the AugmentedFace.

ForeheadRight

A region around the right forehead of the AugmentedFace.

NoseTip

A region around the nose of the AugmentedFace.

AugmentedImageTrackingMethod

 AugmentedImageTrackingMethod

Indicates whether an image is being tracked using the camera image, or is being tracked based on its last known pose.

Properties
FullTracking

The Augmented Image is currently being tracked using the camera image.

This state can only occur when the image's TrackingState is TrackingState.Tracking.

LastKnownPose

The Augmented Image is currently being tracked based on its last known pose, because it can no longer be tracked using the camera image.

This state can only occur when the image's TrackingState is TrackingState.Tracking.

NotTracking

The Augmented Image is not currently being tracked.

This state indicates that the image's TrackingState is TrackingState.Paused or TrackingState.Stopped.

CameraConfigDepthSensorUsage

 CameraConfigDepthSensorUsage

Type of depth sensor usage for a camera config.

Properties
DoNotUse

Indicates that ARCore will not attempt to use a depth sensor, even if it is present.

Most commonly used to filter camera configurations when the app requires exclusive access to the depth sensor outside of ARCore, for example to support 3D mesh reconstruction. Available on all ARCore supported devices.

RequireAndUse

Indicates that a depth sensor must be present on the device, and the depth sensor will be used by ARCore.

Not supported on all devices.

CameraConfigStereoCameraUsage

 CameraConfigStereoCameraUsage

Type of stereo camera usage for a camera config.

Properties
DoNotUse

Indicates that ARCore will not attempt to use a stereo camera, even if one is present.

Can be used to limit power consumption. Available on all ARCore supported devices.

RequireAndUse

Indicates that a stereo camera must be present on the device and the stereo camera will be used by ARCore.

Not supported on all devices.

CameraFocusMode

 CameraFocusMode

Selects the desired focus mode of the camera.

Properties
AutoFocus

Auto focus camera focus mode.

FixedFocus

Fixed focus camera focus mode.

CameraMetadataTag

 CameraMetadataTag

This enum follows the layout of NdkCameraMetadataTags.

The values in the file are used for requesting / marshaling camera image's metadata. The comments have been removed to keep the code readable. Please refer to NdkCameraMetadataTags.h for documentation: https://developer.android.com/ndk/reference/ndk_camera_metadata_tags_8h.html .

CloudAnchorMode

 CloudAnchorMode

Defines possible modes for ARCore Cloud Anchors.

Properties
Disabled

Cloud Anchors are disabled.

This is the default value.

Enabled

Cloud Anchors are enabled, HostCloudAnchor() and ResolveCloudAnchor() functions are available.

The app is expected to have the INTERNET permission (Android only).

DepthMode

 DepthMode

Desired depth mode.

Properties
Automatic

On supported devices the best possible depth is estimated based on hardware and software sources.

Available sources of automatic depth are:

Disabled

Depth is disabled.

DepthStatus

 DepthStatus

Status for an attempt to retrieve the current depth texture.

Properties
IllegalState

A supported depth mode was not enabled in Session configuration.

InternalError

An internal error occurred, so the depth image was not updated.

This could occur if the session is not ready, or in the event of other internal errors.

NotTracking

Session.Status is not SessionStatus.Tracking, which is required to acquire depth images.

NotYetAvailable

The depth information is not available for this frame, the number of observed camera frames is not yet sufficient for depth estimation, or depth estimation was not possible due to poor lighting, camera occlusion, or no motion observed.

Success

The depth image was retrieved successfully.

DetectedPlaneFindingMode

 DetectedPlaneFindingMode

Selects the behavior of the plane detection subsystem.

Properties
Disabled

Plane detection is disabled.

Horizontal

Detection of only horizontal planes is enabled.

HorizontalAndVertical

Detection of both horizontal and vertical planes is enabled.

Vertical

Detection of only vertical planes is enabled.

DetectedPlaneType

 DetectedPlaneType

Simple summary of the normal vector of a plane.

Properties
HorizontalDownwardFacing

A horizontal plane facing downward.

HorizontalUpwardFacing

A horizontal plane facing upward.

Vertical

A vertical plane.

DeviceCameraDirection

 DeviceCameraDirection

The direction the device camera used by the session is facing.

Properties
BackFacing

The device camera faces the world.

FrontFacing

The device camera faces the user.

DisplayUvCoordinateType

 DisplayUvCoordinateType

Types of UV coordinates used for the display.

Properties
BackgroundImage

The background image bytes used for CPU access to the pass-through camera image available from GoogleARCore.Frame.CameraImage.AcquireCameraImageBytes.

BackgroundTexture

The background texture used to display the pass-through camera available from GoogleARCore.Frame.CameraImage.Texture.

UnityScreen

The Unity Screen.

FeaturePointOrientationMode

 FeaturePointOrientationMode

The orientation mode of the feature point.

Properties
Identity

The orientation of the feature point is initialized to identity but may adjust slightly over time.

SurfaceNormal

The orientation of the feature point will follow the behavior that X+ is perpendicular to the cast ray and parallel to the physical surface centered around the hit test, Y+ points along the estimated surface normal, and Z+ points roughly toward the user's device.

InstantPlacementMode

 InstantPlacementMode

Indicates whether Instant Placement is enabled or disabled.

The default value is InstantPlacementMode.Disabled.

Properties
Disabled

Instant Placement mode is disabled.

When Instant Placement is disabled, any InstantPlacementPoint having InstantPlacementPointTrackingMethod.ScreenspaceWithApproximateDistance tracking method will result in tracking state becoming permanently TrackingState.Stopped.

LocalYUp

Enable Instant Placement.

If the hit test is successful, it will return a single InstantPlacementPoint with the +Y pointing upward, against gravity. Otherwise, returns an empty result set.

This mode is currently intended to be used with hit tests against horizontal surfaces.

Hit tests may also be performed against surfaces with any orientation, however:

  • The resulting Instant Placement point will always have a pose with +Y pointing upward, against gravity.
  • No guarantees are made with respect to orientation of +X and +Z. Specifically, a hit test against a vertical surface, such as a wall, will not result in a pose that's in any way aligned to the plane of the wall, other than +Y being up, against gravity.
  • The InstantPlacementPoint's tracking method may never become InstantPlacementPointTrackingMethod.FullTracking or may take a long time to reach this state.The tracking method remains InstantPlacementPointTrackingMethod. ScreenspaceWithApproximateDistance until a (tiny) horizontal plane is fitted at the point of the hit test.

InstantPlacementPointTrackingMethod

 InstantPlacementPointTrackingMethod

Tracking methods for InstantPlacementPoint.

Properties
FullTracking

The InstantPlacementPoint is being tracked normally and InstantPlacementPoint.Pose is fully determined by ARCore.

ARCore does not limit the number of InstantPlacementPoints with FullTracking that are being tracked concurrently.

NotTracking

The InstantPlacementPoint is not currently being tracked.

The TrackingState is TrackingState.Paused or TrackingState.Stopped.

ScreenspaceWithApproximateDistance

The InstantPlacementPoint is currently being tracked in screen space and the pose returned by InstantPlacementPoint.

Pose is being estimated using the approximate distance provided to Frame.RaycastInstantPlacement(float, float, float, TrackableHit).

ARCore concurrently tracks at most 20 InstantPlacementPoints that are ScreenspaceWithApproximateDistance. As additional InstantPlacementPoints with ScreenspaceWithApproximateDistance are created, the oldest points will become permanently cref="TrackingState"/>.Stopped in order to maintain the the maximum number of concurrently tracked points.

LightEstimateState

 LightEstimateState

Possible states for LightEstimate.

Properties
NotValid

Estimate is not valid and should not be used.

Valid

Estimate is valid.

LightEstimationMode

 LightEstimationMode

Defines possible modes for ARCore real-world light estimation.

Properties
AmbientIntensity

Lighting estimation is enabled, generating ambient intensity and color-correction estimation.

Disabled

A mode where light estimation is disabled.

EnvironmentalHDRWithReflections

Lighting estimation is enabled.

ARCore will estimate lighting to provide directional light, ambient spherical harmonics, and reflection cubemap estimation. This LightEstimationMode is incompatible with front-facing (selfie) camera.

EnvironmentalHDRWithoutReflections

Lighting estimation is enabled.

ARCore will estimate lighting to provide directional light and ambient spherical harmonics. This LightEstimationMode is incompatible with the front-facing (selfie) camera.

LostTrackingReason

 LostTrackingReason

Describes the reason for a loss in motion tracking.

Properties
BadState

An internal error is causing motion tracking to fail.

CameraUnavailable

Motion tracking paused because the camera is in use by another application.

Tracking will resume once this app regains priority, or once all apps with higher priority have stopped using the camera. Prior to ARCore SDK 1.13, LostTrackingReason.None is returned in this case instead.

ExcessiveMotion

Excessive movement of the device camera is causing motion tracking to fail.

InsufficientFeatures

A lack of visually distinct environmental features in the camera feed is causing motion tracking to fail.

InsufficientLight

The camera feed being too dark is causing motion tracking to fail.

None

Motion tracking is working properly.

PlaybackResult

 PlaybackResult

Results from attempting to set playback dataset filepath.

Properties
ErrorPlaybackFailed

Playback failed.

ErrorSessionNotPaused

The session was not paused when setting the playback dataset.

ErrorSessionUnsupported

Operation is unsupported with the current session.

OK

The request completed successfully.

PlaybackStatus

 PlaybackStatus

Describes the current playback status.

Properties
FinishedSuccess

Playback has finished successfully.

The session is waiting on final frame. of the dataset. Clear the playback filepath to resume live camera feed.

IOError

Playback has stopped due to an error.

None

The session is not playing back a dataset.

OK

Playback is in process without issues.

RecordingResult

 RecordingResult

Results from recording methods.

TODO: b/144726872 Consider renaming more consistently with the rest of the SDK.

Properties
ErrorIllegalState

A recording is already in progress.

ErrorInvalidArgument

The was null or invalid.

ErrorRecordingFailed

IO or other general failure.

OK

The request completed successfully.

RecordingStatus

 RecordingStatus

Describes the current recording status.

Properties
IOError

There was an IO error while recording.

None

The recorder is not recording.

OK

The recorder is recording normally.

SessionStatus

 SessionStatus

Possible states for the ARCore session.

Properties
ErrorApkNotAvailable

The ARCore session cannot begin tracking because the ARCore service APK is not available on the device.

ErrorCameraNotAvailable

The ARCore session cannot begin tracking because the camera has been reallocated to a higher priority application or is otherwise unavailable.

ErrorIllegalState

The ARCore session cannot begin tracking because the camera configuration was changed, and there is at least one unreleased image.

ErrorPermissionNotGranted

The ARCore session cannot begin tracking because an Android permission, such as android.permission.CAMERA, is not granted.

Use AndroidPermissionsManager.IsPermissionGranted to check if the required Android permission has been granted.

ErrorSessionConfigurationNotSupported

The ARCore session cannot begin tracking because the session configuration supplied is not supported or no session configuration was supplied.

To recover, fix the configuration and ensure ARCoreSession is not enabled. Once SessionStatus is SessionStatus.NotTracking, ARCoreSession can be enabled.

FatalError

The ARCore session cannot begin tracking because a fatal error was encountered.

Initializing

The ARCore session is initializing.

LostTracking

The ARCore session has lost tracking and is attempting to recover.

None

The ARCore session has not been initialized.

NotTracking

The ARCore session is paused.

Tracking

The ARCore session is tracking.

TrackableHitFlags

 TrackableHitFlags

Flags representing categories of raycast hits.

Properties
Default

This value is used to collide with all things good for placing objects.

If you pass this into Raycast, you will collide with planes within the bounding polygon and feature points with normals.

FeaturePoint

The collision is on a feature point in the current frame's point cloud.

FeaturePointWithSurfaceNormal

The collision is on a feature point in the current frame's point cloud that has a surface normal estimate (orientation).

None

This value is returned on a TrackableHit to indicate no collision occurred.

If you pass this into Raycast, you will not get any collision results.

PlaneWithinBounds

The collision is within the DetectedPlane's bounding box.

PlaneWithinInfinity

The collision is on the DetectedPlane, but not limited to the bounding box or polygon.

This acts as if the plane extends out to infinity.

PlaneWithinPolygon

The collision is within the DetectedPlane's convex bounding polygon.

TrackableQueryFilter

 TrackableQueryFilter

A filter for trackable queries.

Properties
All

Indicates available trackables.

New

Indicates new trackables detected in the current ARCore Frame.

Updated

Indicates trackables that were updated in the current ARCore Frame.

TrackingState

 TrackingState

Possible tracking states for ARCore.

Properties
Paused

ARCore has paused tracking the entity but may resume tracking it in the future.

Stopped

ARCore has stopped tracking the entity and will never resume tracking it.

Tracking

The entity is actively being tracked.