Struct TrackableId
A session-unique identifier for trackables in the real-world environment, e.g., planes and feature points.
Namespace: UnityEngine.XR.ARSubsystems
Syntax
public struct TrackableId : IEquatable<TrackableId>
Remarks
Ids are generally unique to a particular session, but multiple sessions may produce identical ids for different trackables.
A trackable id is a 128 bit number, stored as two ulongs. This makes it large enough to hold a Guid.
Constructors
TrackableId(UInt64, UInt64)
Constructs a TrackableId from two ulongs.
Declaration
public TrackableId(ulong subId1, ulong subId2)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt64 | subId1 | The first half of the id. |
| System.UInt64 | subId2 | The second half of the id. |
Properties
invalidId
Get the invalid id.
Declaration
public static TrackableId invalidId { get; }
Property Value
| Type | Description |
|---|---|
| TrackableId |
subId1
The first half of the id.
Declaration
public ulong subId1 { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt64 |
subId2
The second half of the id.
Declaration
public ulong subId2 { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt64 |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Overrides
System.ValueType.Equals(System.Object)
Equals(TrackableId)
Declaration
public bool Equals(TrackableId other)
Parameters
| Type | Name | Description |
|---|---|---|
| TrackableId | other |
Returns
| Type | Description |
|---|---|
| System.Boolean |
GetHashCode()
Generates a hash code suitable for use in a Dictionary or Set.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A hash code for participation in certain collections. |
Overrides
System.ValueType.GetHashCode()
ToString()
Generates a string representation of the id suitable for debugging.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string representation of the id. |
Overrides
System.ValueType.ToString()
Operators
Equality(TrackableId, TrackableId)
Declaration
public static bool operator ==(TrackableId id1, TrackableId id2)
Parameters
| Type | Name | Description |
|---|---|---|
| TrackableId | id1 | |
| TrackableId | id2 |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Inequality(TrackableId, TrackableId)
Declaration
public static bool operator !=(TrackableId id1, TrackableId id2)
Parameters
| Type | Name | Description |
|---|---|---|
| TrackableId | id1 | |
| TrackableId | id2 |
Returns
| Type | Description |
|---|---|
| System.Boolean |