# ARShareableAnchor

Represents a shareable anchor tracked by an XR device.

Generated by the [ARShareableAnchorManager](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchorManager#classGoogle_1_1XR_1_1Extensions_1_1ARShareableAnchorManager) when an XR device creates or loads a shareable anchor in the environment.

## Summary

### Inheritance

Inherits from: `ARTrackable< XRShareableAnchor, ARShareableAnchor >`

| ### Public attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchor#geospatialpose => _geospatialPose` | `https://developer.android.com/develop/xr/unity/reference/struct/Google/XR/Extensions/XRGeospatialPose#structGoogle_1_1XR_1_1Extensions_1_1XRGeospatialPose` Gets the geospatial pose where this anchor is placed. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchor#host => _isGeospatialAnchor ? XRShareableAnchorHosts.Geospatial : sessionRelativeData.host` | `https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrshareableanchorhosts` Gets the host of this shareable anchor. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchor#shareableid => sessionRelativeData.shareableId` | `SerializableGuid` Gets the shareable ID to retrieve the anchor from other clients. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchor#surfacetype => _surfaceType` | `https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrgeospatialsurfacetype` Gets the surface type of a geospatial anchor. |

## Public attributes

### geospatialPose

```c#
XRGeospatialPose geospatialPose => _geospatialPose
```
Gets the geospatial pose where this anchor is placed.

Combined with [surfaceType](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchor#surfacetype) to retrieve the same geospatial anchor from other clients.

### host

```c#
XRShareableAnchorHosts host =>
            _isGeospatialAnchor ? XRShareableAnchorHosts.Geospatial : sessionRelativeData.host
```
Gets the host of this shareable anchor.

### shareableId

```c#
SerializableGuid shareableId => sessionRelativeData.shareableId
```
Gets the shareable ID to retrieve the anchor from other clients.

### surfaceType

```c#
XRGeospatialSurfaceType surfaceType => _surfaceType
```
Gets the surface type of a geospatial anchor.

It is only valid when [host](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/ARShareableAnchor#host) is [XRShareableAnchorHosts.Geospatial](https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrshareableanchorhosts_geospatial).