ARPin Overview

With ARPin, you can mark a fixed real-world location in AR to which you can attach virtual content within Unreal Engine

Windows
MacOS
Linux

ARPins are a fixed real-world location in augmented reality (AR) to which you can attach virtual content within Unreal Engine. The ARPin API is the same across all platforms, but each platform has its own implementation for the ARPin data. If the underlying platform supports tracking real world locations or real world geometry, this functionality improves the stability of the ARPin locations so they stay locked to the corresponding real world position or geometry.

example of adding and removing pins in AR environment

Storing ARPin Data

In addition to the virtual content being locked to a specific position or geometry, some platforms also support storing the location data locally or in the cloud. Being able to store the location data means that virtual content can appear consistent between app sessions and, with some implementations, multi-user experiences.

The following table describes which AR platforms support storing ARPin data locally or with Microsoft Azure cloud services.

Platform

ARPin Platform Implementation

ARPin Persistence Platform Implementation

Support for ARPin Local Storage functions?

Support for Azure Spatial Anchors?

ARCore

Anchor

Cloud Anchor

No

Yes

ARKit

ARAnchor

ARGeoAnchor

No

Yes

HoloLens

Spatial Anchor

Azure Spatial Anchors

Yes, using either of the following plugins:

  • Windows Mixed Reality

  • Microsoft OpenXR

Yes, using either of the following plugins:

  • Azure Spatial Anchors for WMR

  • Microsoft OpenXR

Magic Leap

PersistentCoordinateFrame (PCF)

PersistentCoordinateFrame (PCF)

Yes, with the Magic Leap ARPin functions.

No

Storing ARPins Locally

By storing the data locally on the AR device, content can persist between app sessions. For details on how to add ARPin functionality to your project, see the ARPin Quick Start.

Storing ARPins in the Cloud

You can store ARPins in the cloud through Azure Spatial Anchors, Cloud Anchors with ARCore, and Geo Anchors with ARKit.

Azure Spatial Anchors

Storing data in the cloud means the virtual content and real-world locations can be shared at any point in time between multiple devices and platforms. Azure Spatial Anchors is a cloud implementation included as a plugin in Unreal Engine for storing and retrieving ARPin data using Microsoft Azure. Azure Spatial Anchors are supported on multiple AR platforms including:

  • Windows Mixed Reality (HoloLens)

  • Android devices that support ARCore

  • iOS devices that support ARKit

Azure Spatial Anchors requires an Azure account to use.

In order to use Azure Spatial Anchors in your project, enable the Azure Spatial Anchors plugin and the Azure Spatial Anchors plugin specific to your platform.

Azure Spatial Anchors plugin

For more on how to use Azure Spatial Anchors in your project, see Microsoft's documentation on Azure Spatial Anchors in Unreal Engine.

Cloud Anchors with ARCore

In addition to being able to use Azure Spatial Anchors on ARCore-supported devices, Google's platform implementation for ARPin in the cloud, Cloud Anchors, is exposed in Unreal Engine through the UGoogleARCoreServicesFunctionLibrary.

To use the API:

  1. Create a cloud ARPin from an existing ARPin by calling UGoogleARCoreServicesFunctionLibrary::CreateAndHostCloudARPin().

  2. When the cloud ARPin is created, access its cloud ID--the uuid that is unique to the pin--by calling UCloudARPin::GetCloudID().

  3. At any given time, you can resolve a previously created cloud ARPin with UGoogleARCoreServicesFunctionLibrary::CreateAndResolveCloudARPin(). If the resolve is successful, the cloud ARPin will provide the pin's world transform, showing where the pin was created in the physical world.

Geo Anchors with ARKit

In addition to being able to use Azure Spatial Anchors on ARKit-supported devices, Apple's platform implementation for ARPin in the cloud, ARGeoAnchor, is exposed in Unreal Engine as a subclass of UARTrackedGeometry.

To use the API:

  1. Query UARGeoTrackingSupport::GetGeoTrackingSupport().

  2. Call the functions on the returned object if it's available. For example to create a new Geo Anchor, use the function UARGeoTrackingSupport::AddGeoAnchorAtLocation().

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss