Struct XrSpatialMarkerDataEXT
The marker component. Provided by XR_EXT_spatial_marker_tracking.
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.NativeTypes
Assembly: Unity.XR.OpenXR.dll
Syntax
public readonly struct XrSpatialMarkerDataEXT : IEquatable<XrSpatialMarkerDataEXT>
Constructors
XrSpatialMarkerDataEXT(XrSpatialCapabilityEXT, uint, XrSpatialBufferEXT)
Construct an instance.
Declaration
public XrSpatialMarkerDataEXT(XrSpatialCapabilityEXT capability, uint markerId, XrSpatialBufferEXT data)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialCapabilityEXT | capability | The capability that detected the marker. |
| uint | markerId | The ID of the marker. Must be zero for QR codes. |
| XrSpatialBufferEXT | data | The buffer ID and type of additional information contained in the marker. |
Properties
capability
The capability that detected the marker.
Declaration
public XrSpatialCapabilityEXT capability { get; }
Property Value
| Type | Description |
|---|---|
| XrSpatialCapabilityEXT |
data
The buffer ID and type of additional information contained in the marker.
ArUco markers and AprilTags do not support additional information, and for those marker types the
data.bufferId value must be zero.
Declaration
public XrSpatialBufferEXT data { get; }
Property Value
| Type | Description |
|---|---|
| XrSpatialBufferEXT |
markerId
The ID of the marker. For ArUco markers and AprilTags, this property must be nonzero. For QR codes, this field must be zero.
Declaration
public uint markerId { get; }
Property Value
| Type | Description |
|---|---|
| uint |
Methods
Equals(object)
Compares for equality.
Two instances are equal if their capability, markerId, and data are equal.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The other object. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
Equals(XrSpatialMarkerDataEXT)
Compares for equality.
Two instances are equal if their capability, markerId, and data are equal.
Declaration
public bool Equals(XrSpatialMarkerDataEXT other)
Parameters
| Type | Name | Description |
|---|---|---|
| XrSpatialMarkerDataEXT | other | The other instance. |
Returns
| Type | Description |
|---|---|
| bool |
|
GetHashCode()
Generates a unique hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | The hash code. |