docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XrSpatialMarkerDataEXT

    The marker component. Provided by XR_EXT_spatial_marker_tracking.

    Implements
    IEquatable<XrSpatialMarkerDataEXT>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    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

    true if obj is an XrSpatialMarkerDataEXT and equal to this instance. Otherwise, false.

    Overrides
    ValueType.Equals(object)

    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

    true if the instances are equal. Otherwise, false.

    GetHashCode()

    Generates a unique hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The hash code.

    Overrides
    ValueType.GetHashCode()

    Implements

    IEquatable<T>
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)