docs.unity3d.com
    Show / Hide Table of Contents

    Struct XRParticipant

    The session-relative data associated with a participant.

    Inherited Members
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    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 GetChanges(Allocator).

    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.

    UnityEngine.Pose pose

    The Pose associated with this participant.

    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 Poses, which are initialized to Pose.identity.

    Declaration
    public static readonly 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 readonly IntPtr nativePtr { get; }
    Property Value
    Type Description
    IntPtr
    Implements
    ITrackable.nativePtr

    pose

    The Pose, in session space, associated with this participant.

    Declaration
    public readonly Pose pose { get; }
    Property Value
    Type Description
    UnityEngine.Pose
    Implements
    ITrackable.pose

    sessionId

    This participant's session identifier.

    Declaration
    public readonly Guid sessionId { get; }
    Property Value
    Type Description
    Guid

    trackableId

    The TrackableId associated with this participant.

    Declaration
    public readonly TrackableId trackableId { get; }
    Property Value
    Type Description
    TrackableId
    Implements
    ITrackable.trackableId

    trackingState

    The TrackingState associated with this participant.

    Declaration
    public readonly TrackingState trackingState { get; }
    Property Value
    Type Description
    TrackingState
    Implements
    ITrackable.trackingState

    Methods

    Equals(Object)

    Tests for equality.

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

    The object to compare against.

    Returns
    Type Description
    Boolean

    true if obj is of type XRParticipant and Equals(XRParticipant) also returns true.

    Overrides
    ValueType.Equals(Object)

    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

    true if other is equal to this XRParticipant.

    Implements
    IEquatable<T>.Equals(T)

    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 HashSet and Dictionary.

    Overrides
    ValueType.GetHashCode()

    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

    true if lhs is equal to rhs.

    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

    true if lhs is not equal to rhs.

    See Also

    XRParticipantSubsystem
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023