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
Inherited Members
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 |
Overrides
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 |
|
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
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 |
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 |