Spatial Entities Markers
This page is a supplement to the AR Foundation Markers manual. The following sections only contain information about APIs where Spatial Entities exhibits unique platform-specific behavior.
Tip
When developing an AR app, refer to both the AR Foundation documentation as well as the required packages for each platform you support.
Configure marker detection
To configure marker detection in your Spatial Entities project:
- Open the OpenXR section of the XR Plug-in Management settings (menu: Edit > Project Settings > XR Plug-in Management > OpenXR tab).
- Under OpenXR Feature Groups, select Spatial Entities to open the list of Spatial Entities features.
- Enable Spatial Entities: Markers.
- Click the gear icon (⚙) next to Spatial Entities: Markers to open the Spatial Entities: Markers window and enable each type of marker you want your project to support.

Markers configuration window.
Once you have enabled your chosen marker types, you can configure Marker settings for individual marker types.
Permissions
Your app can't access any spatial data until the user grants the necessary permissions on their device. Refer to Permissions for more information.
Verify platform support
The options you configure for Spatial entities: Markers are requests to the OpenXR runtime. The behavior of these settings depends on whether the runtime supports XR_EXT_spatial_marker_tracking extension and its specific capabilities.
After the XRMarkerSubsystem has started, query the marker feature configuration to confirm which of these options were successfully enabled and are actively used by the runtime. Refer to Query and configure markers at runtime for example code.
Marker settings reference
In the settings window for the Spatial Entities Marker feature, you can configure the following options for each marker type:
| Property | Description |
|---|---|
| Enable Detection | Enable or disable the detection of the specific marker type by the spatial marker tracking runtime. |
| Markers are fixed size | If enabled, the runtime will assume a fixed physical size for markers of this type, which can improve pose and size tracking accuracy, provided the runtime supports this feature. Enabling this option will reveal a new option for setting the side length of the fixed size marker. |
| Side length (meters) | Specifies the length (in meters) of each side for fixed-size markers. This option is only available if you enable Markers are fixed size, and if it's supported by the runtime. |
| Markers are static | When enabled, the runtime will assume that markers of this type are static in the environment. This can lead to improved pose and size tracking stability if supported by the runtime. |
You can also configure the following options for specified marker types:
| Property | Marker type | Description |
|---|---|---|
| Dictionary | ArUco, AprilTag | Configure the dictionary for supported marker types. |
The following image shows the options you can configure in the Spatial Entities: Markers window:

Markers configuration options.
Query and configure marker properties at runtime
You can query and configure the supported marker properties at runtime, as shown in the following code example:
void MarkerConfiguration()
{
var settings = OpenXRSettings.Instance;
var feature = settings.GetFeature<SpatialMarkerFeature>();
// Enable QR code detection that are a fixed size with a
// side length of 0.05 meters, and static markers.
feature.qrCodeConfigOptions.enableCapability = true;
feature.qrCodeConfigOptions.enableFixedSizeMarker = true;
feature.qrCodeConfigOptions.fixedSizeMarkerSideLength = 0.05f;
feature.qrCodeConfigOptions.enableStaticMarker = true;
// Enable ArUco marker detection and static markers.
feature.arucoMarkerConfigOptions.enableCapability = true;
feature.arucoMarkerConfigOptions.enableStaticMarker = true;
// Leave all other markers and options disabled
}
Note
You can only configure markers at runtime before the spatial context is setup. Once the spatial context is created, any set configuration is applied and cannot be changed.