docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct XRSpatialBuffer

    Represents a spatial buffer containing marker's encoded data, as detected by the XR marker subsystem if the marker supports encoded data.

    Implements
    IEquatable<XRSpatialBuffer>
    Inherited Members
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.ARSubsystems
    Assembly: Unity.XR.ARSubsystems.dll
    Syntax
    public readonly struct XRSpatialBuffer : IEquatable<XRSpatialBuffer>

    Constructors

    XRSpatialBuffer(ulong, XRSpatialBufferType)

    Constructs a new XRSpatialBuffer with the given id and data type.

    Declaration
    public XRSpatialBuffer(ulong bufferId, XRSpatialBufferType bufferType)
    Parameters
    Type Name Description
    ulong bufferId

    Unique identifier for this spatial buffer.

    XRSpatialBufferType bufferType

    The type of data in the buffer.

    Properties

    bufferId

    The unique identifier for the buffer, assigned by the subsystem or provider.

    Declaration
    public ulong bufferId { get; }
    Property Value
    Type Description
    ulong

    bufferType

    The type of data stored in this buffer.

    Declaration
    public XRSpatialBufferType bufferType { get; }
    Property Value
    Type Description
    XRSpatialBufferType

    Methods

    Equals(object)

    Compares this XRSpatialBuffer with another object for equality.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with this instance.

    Returns
    Type Description
    bool

    true if obj is an XRSpatialBuffer and is equal to this instance; otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(XRSpatialBuffer)

    Compares this XRSpatialBuffer with another for equality.

    Declaration
    public bool Equals(XRSpatialBuffer other)
    Parameters
    Type Name Description
    XRSpatialBuffer other

    The other XRSpatialBuffer to compare against.

    Returns
    Type Description
    bool

    true if the two buffers are equal, otherwise false.

    Remarks

    Two buffers are considered equal if they have the same bufferId and bufferType.

    GetHashCode()

    Generates a hash code for this XRSpatialBuffer.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code suitable for use in data structures that use hashing.

    Overrides
    ValueType.GetHashCode()

    Operators

    operator ==(XRSpatialBuffer, XRSpatialBuffer)

    Compares two XRSpatialBuffer objects for equality.

    Declaration
    public static bool operator ==(XRSpatialBuffer left, XRSpatialBuffer right)
    Parameters
    Type Name Description
    XRSpatialBuffer left

    The XRSpatialBuffer on the left-hand side of the operator.

    XRSpatialBuffer right

    The XRSpatialBuffer on the right-hand side of the operator.

    Returns
    Type Description
    bool

    true if the two buffers are equal, otherwise false.

    operator !=(XRSpatialBuffer, XRSpatialBuffer)

    Compares two XRSpatialBuffer objects for inequality.

    Declaration
    public static bool operator !=(XRSpatialBuffer left, XRSpatialBuffer right)
    Parameters
    Type Name Description
    XRSpatialBuffer left

    The XRSpatialBuffer on the left-hand side of the operator.

    XRSpatialBuffer right

    The XRSpatialBuffer on the right-hand side of the operator.

    Returns
    Type Description
    bool

    true if the two buffers are not equal, otherwise false.

    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)