Struct XRTrackedObject
Describes a tracked object detected by the XRObject
Inherited Members
Namespace: UnityEngine .XR.ARSubsystems
Assembly: Unity.XR.ARSubsystems.dll
Syntax
public struct XRTrackedObject : ITrackable, IEquatable<XRTrackedObject>
Remarks
Tracked objects are detected based on the contents of an XRReference
Constructors
XRTrackedObject(TrackableId, Pose, TrackingState, IntPtr, Guid)
Constructs an XRTracked
Declaration
public XRTrackedObject(TrackableId trackableId, Pose pose, TrackingState trackingState, IntPtr nativePtr, Guid referenceObjectGuid)
Parameters
Type | Name | Description |
---|---|---|
Trackable |
trackableId | The Trackable |
Pose | pose | The |
Tracking |
trackingState | The Tracking |
Int |
nativePtr | A native pointer associated with this tracked object. If not |
Guid | referenceObjectGuid | The |
See Also
Properties
defaultValue
A XRTracked
Declaration
public static XRTrackedObject defaultValue { get; }
Property Value
Type | Description |
---|---|
XRTracked |
See Also
nativePtr
A native pointer associated with this tracked object.
Declaration
public IntPtr nativePtr { get; }
Property Value
Type | Description |
---|---|
Int |
Remarks
The lifetime of this pointer is provider-specific, but
should be valid at least until the next call to
Get
See Also
pose
The Pose
associated with this tracked object.
Declaration
public Pose pose { get; }
Property Value
Type | Description |
---|---|
Pose |
See Also
referenceObjectGuid
The GUID
associated with the source XRReference
Declaration
public Guid referenceObjectGuid { get; }
Property Value
Type | Description |
---|---|
Guid |
See Also
trackableId
The Trackable
Declaration
public TrackableId trackableId { get; }
Property Value
Type | Description |
---|---|
Trackable |
See Also
trackingState
The Tracking
Declaration
public TrackingState trackingState { get; }
Property Value
Type | Description |
---|---|
Tracking |
See Also
Methods
Equals(object)
Tests for equality.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The |
Returns
Type | Description |
---|---|
bool |
|
Overrides
See Also
Equals(XRTrackedObject)
Tests for equality.
Declaration
public bool Equals(XRTrackedObject other)
Parameters
Type | Name | Description |
---|---|---|
XRTracked |
other | The other XRTracked |
Returns
Type | Description |
---|---|
bool |
|
See Also
GetHashCode()
Generates a hash suitable for use with containers like HashSet
and Dictionary
.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code generated from this object's trackable |
Overrides
See Also
Operators
operator ==(XRTrackedObject, XRTrackedObject)
Tests for equality. Same as Equals(XRTracked
Declaration
public static bool operator ==(XRTrackedObject lhs, XRTrackedObject rhs)
Parameters
Type | Name | Description |
---|---|---|
XRTracked |
lhs | The left-hand side of the comparison. |
XRTracked |
rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
bool |
|
See Also
operator !=(XRTrackedObject, XRTrackedObject)
Tests for inequality. Same as !
Equals(XRTracked
Declaration
public static bool operator !=(XRTrackedObject lhs, XRTrackedObject rhs)
Parameters
Type | Name | Description |
---|---|---|
XRTracked |
lhs | The left-hand side of the comparison. |
XRTracked |
rhs | The right-hand side of the comparison. |
Returns
Type | Description |
---|---|
bool |
|