Struct XRParticipant
The session-relative data associated with a participant.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public struct XRParticipant : ITrackable, IEquatable<XRParticipant>
Remarks
A "participant" is another device in a multi-user collaborative session.
Constructors
XRParticipant(TrackableId, Pose, TrackingState, IntPtr, Guid)
Constructs an XRParticipant. XRParticipants are generated
by
Declaration
public XRParticipant(TrackableId trackableId, Pose pose, TrackingState trackingState, IntPtr nativePtr, Guid sessionId)
Parameters
Type | Name | Description |
---|---|---|
TrackableId | trackableId | The TrackableId associated with this participant. |
Pose | pose | The |
TrackingState | trackingState | The TrackingState associated with this participant. |
IntPtr | nativePtr | A native pointer associated with this participant. |
Guid | sessionId | The session from which this participant originated. |
Properties
defaultParticipant
An XRParticipant with default values. This is mostly zero-initialized,
except for objects like Pose
s, which are initialized to Pose.identity
.
Declaration
public static XRParticipant defaultParticipant { get; }
Property Value
Type | Description |
---|---|
XRParticipant |
nativePtr
A native pointer associated with this participant. The data pointer to by this pointer is implementation defined.
Declaration
public IntPtr nativePtr { get; }
Property Value
Type | Description |
---|---|
IntPtr |
Implements
pose
The Pose
, in session-space, associated with this participant.
Declaration
public Pose pose { get; }
Property Value
Type | Description |
---|---|
Pose |
Implements
sessionId
This participant's session identifier.
Declaration
public Guid sessionId { get; }
Property Value
Type | Description |
---|---|
Guid |
trackableId
The TrackableId associated with this participant.
Declaration
public TrackableId trackableId { get; }
Property Value
Type | Description |
---|---|
TrackableId |
Implements
trackingState
The TrackingState associated with this participant.
Declaration
public TrackingState trackingState { get; }
Property Value
Type | Description |
---|---|
TrackingState |
Implements
Methods
Equals(Object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj | The |
Returns
Type | Description |
---|---|
Boolean |
|
Overrides
Equals(XRParticipant)
Tests for equality.
Declaration
public bool Equals(XRParticipant other)
Parameters
Type | Name | Description |
---|---|---|
XRParticipant | other | The other XRParticipant to compare against. |
Returns
Type | Description |
---|---|
Boolean |
|
GetHashCode()
Generates a hash suitable for use with containers like HashSet
and Dictionary
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | A hash suitable for use with containers like |
Overrides
Operators
Equality(XRParticipant, XRParticipant)
Tests for equality. Same as Equals(XRParticipant).
Declaration
public static bool operator ==(XRParticipant lhs, XRParticipant rhs)
Parameters
Type | Name | Description |
---|---|---|
XRParticipant | lhs | The left-hand side of the comparison. |
XRParticipant | rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
Boolean |
|
Inequality(XRParticipant, XRParticipant)
Tests for inequality. Same as !
Equals(XRParticipant).
Declaration
public static bool operator !=(XRParticipant lhs, XRParticipant rhs)
Parameters
Type | Name | Description |
---|---|---|
XRParticipant | lhs | The left-hand side of the comparison. |
XRParticipant | rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
Boolean |
|