Skip to main content
Version: 3.2

struct XRPersistentAnchorPayload

(Niantic.Lightship.AR.XRSubsystems.XRPersistentAnchorPayload)

Overview

Represents the payload for a persistent anchor.

	struct XRPersistentAnchorPayload: IEquatable< XRPersistentAnchorPayload > {
// fields

IntPtr nativePtr => m_NativePtr;
int size => m_Size;

// methods

XRPersistentAnchorPayload(IntPtr nativePayloadPtr, int size);
bool Equals(XRPersistentAnchorPayload other);
override bool Equals(object obj);
override int GetHashCode();
byte[] GetDataAsBytes();

static bool operator == (
XRPersistentAnchorPayload lhs,
XRPersistentAnchorPayload rhs
);

static bool operator != (
XRPersistentAnchorPayload lhs,
XRPersistentAnchorPayload rhs
);
};

Detailed Documentation

Represents the payload for a persistent anchor.

    See also:

    XRPersistentAnchorPayload

Fields

nativePtr

IntPtr nativePtr => m_NativePtr

A native pointer associated with the anchor payload. The data pointed to by this pointer is implementation-specific.

size

int size => m_Size

The size of the payload

Methods

XRPersistentAnchorPayload

XRPersistentAnchorPayload(IntPtr nativePayloadPtr, int size)

Constructs the payload data for an anchor from native code.

    Parameters:

    nativePayloadPtr - A native pointer associated with the anchor payload. The data pointed to by this pointer is implementation-specific.

Equals

bool Equals(XRPersistentAnchorPayload other)

Tests for equality.

    Parameters:

    other - The other XRPersistentAnchorPayload to compare against.

    Returns:

    True if every field in other is equal to this XRPersistentAnchorPayload, otherwise false.

Equals

override bool Equals(object obj)

Tests for equality.

    Parameters:

    obj - The object to compare against.

    Returns:

    True if obj is of type XRPersistentAnchorPayload and Equals(XRPersistentAnchorPayload) also returns true; otherwise false.

GetDataAsBytes

byte[] GetDataAsBytes()

Get the data associated with this XRPersistentAnchorPayload. This is an expensive operation! Returns empty byte[] if payload is invalid

operator==

static bool operator == (
XRPersistentAnchorPayload lhs,
XRPersistentAnchorPayload rhs
)

Tests for equality. Same as Equals(XRPersistentAnchorPayload).

    Parameters:

    lhs - The left-hand side of the comparison.

    rhs - The right-hand side of the comparison.

    Returns:

    True if lhs is equal to rhs, otherwise false.

operator!=

static bool operator != (
XRPersistentAnchorPayload lhs,
XRPersistentAnchorPayload rhs
)

Tests for inequality. Same as ! Equals(XRPersistentAnchorPayload).

    Parameters:

    lhs - The left-hand side of the comparison.

    rhs - The right-hand side of the comparison.

    Returns:

    True if lhs is not equal to rhs, otherwise false.