Struct ARCollaborationData
Represents the Objective-C type ARCollaborationData.
Inherited Members
Namespace: UnityEngine .XR.ARKit
Assembly: Unity.XR.ARKit.dll
Syntax
public struct ARCollaborationData : IDisposable, IEquatable<ARCollaborationData>
Remarks
This struct mirrors the Objective-C type ARCollaborationData. Because it represents a native resource, it must be explicitly disposed when no longer needed.
ARCollaborationData can be constructed from a byte array, or from
Dequeue
This struct is not thread-safe, but it may be constructed and disposed on any thread.
Constructors
ARCollaborationData(byte[])
Constructs an ARCollaborationData from a byte array.
Check valid after construction to ensure bytes
was successfully deserialized.
Declaration
public ARCollaborationData(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes | An array of |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if |
See Also
ARCollaborationData(byte[], int, int)
Constructs an ARCollaborationData from a byte array.
Check valid after construction to ensure bytes
was successfully deserialized.
Declaration
public ARCollaborationData(byte[] bytes, int offset, int length)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes | An array of |
int | offset | The offset into the |
int | length | The number of bytes in |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if |
Argument |
Thrown if |
Argument |
Thrown if |
See Also
ARCollaborationData(NativeSlice<byte>)
Constructs an ARCollaborationData from a NativeSlice
of byte
s.
Check valid after construction to ensure bytes
was successfully deserialized.
Declaration
public ARCollaborationData(NativeSlice<byte> bytes)
Parameters
Type | Name | Description |
---|---|---|
Native |
bytes | An array of |
Exceptions
Type | Condition |
---|---|
Argument |
Thrown if |
See Also
Properties
priority
Gets the priority of the collaboration data. Use this to determine how you should send the information to peers in a collaborative session (for example, reliably vs. unreliably.)
Declaration
public ARCollaborationDataPriority priority { get; }
Property Value
Type | Description |
---|---|
ARCollaboration |
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if valid is false. |
valid
True if the data is valid. The data might be invalid if this object was constructed with an invalid byte array, or if it has been disposed.
Declaration
public bool valid { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
Dispose()
Dispose the native ARCollaborationData. valid will be false after disposal. It is safe to dispose an invalid or already disposed ARCollaborationData.
Declaration
public void Dispose()
Equals(object)
Compares for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | An |
Returns
Type | Description |
---|---|
bool |
|
Overrides
Equals(ARCollaborationData)
Compares for equality.
Declaration
public bool Equals(ARCollaborationData other)
Parameters
Type | Name | Description |
---|---|---|
ARCollaboration |
other | The other ARCollaboration |
Returns
Type | Description |
---|---|
bool |
|
GetHashCode()
Generates a hash code suitable for use in HashSet
and Dictionary
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash of the ARCollaboration |
Overrides
ToSerialized()
Copies the bytes that represent the serialized ARCollaboration
Declaration
public SerializedARCollaborationData ToSerialized()
Returns
Type | Description |
---|---|
Serialized |
A container that represents the serialized bytes of this ARCollaboration |
Exceptions
Type | Condition |
---|---|
Invalid |
Thrown if valid is false. |
Operators
operator ==(ARCollaborationData, ARCollaborationData)
Compares lhs
and rhs
for equality using Equals(ARCollaboration
Declaration
public static bool operator ==(ARCollaborationData lhs, ARCollaborationData rhs)
Parameters
Type | Name | Description |
---|---|---|
ARCollaboration |
lhs | The left-hand-side ARCollaboration |
ARCollaboration |
rhs | The right-hand-side ARCollaboration |
Returns
Type | Description |
---|---|
bool |
|
operator !=(ARCollaborationData, ARCollaborationData)
Compares lhs
and rhs
for inequality using Equals(ARCollaboration
Declaration
public static bool operator !=(ARCollaborationData lhs, ARCollaborationData rhs)
Parameters
Type | Name | Description |
---|---|---|
ARCollaboration |
lhs | The left-hand-side ARCollaboration |
ARCollaboration |
rhs | The right-hand-side ARCollaboration |
Returns
Type | Description |
---|---|
bool |
|