Struct MarsTrackableId
A unique identifier for trackable data in MARS - mirrors UnityEngine.Experimental.XR.TrackableId
Namespace: Unity.MARS.Data
Syntax
public struct MarsTrackableId : IEquatable<MarsTrackableId>
Constructors
MarsTrackableId(String)
Create a unique identifier for trackable data in MARS
Declaration
public MarsTrackableId(string trackableKey)
Parameters
Type | Name | Description |
---|---|---|
String | trackableKey | Trackable's key |
MarsTrackableId(UInt64, UInt64)
Create a unique identifier for trackable data in MARS
Declaration
public MarsTrackableId(ulong idOne, ulong idTwo)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | idOne | Id 1 |
UInt64 | idTwo | Id 2 |
Properties
InvalidId
Represents an invalid id.
Declaration
public static MarsTrackableId InvalidId { get; }
Property Value
Type | Description |
---|---|
MarsTrackableId |
subId1
The first sub-component of the id.
Declaration
public ulong subId1 { get; }
Property Value
Type | Description |
---|---|
UInt64 |
subId2
The second sub-component of the id.
Declaration
public ulong subId2 { get; }
Property Value
Type | Description |
---|---|
UInt64 |
Methods
Create()
Create a new trackable identifier
Declaration
public static MarsTrackableId Create()
Returns
Type | Description |
---|---|
MarsTrackableId | A new session-unique trackable ID |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Equals(MarsTrackableId)
Declaration
public bool Equals(MarsTrackableId other)
Parameters
Type | Name | Description |
---|---|---|
MarsTrackableId | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
ToString()
Generates a nicely formatted version of the id
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String | A string unique to this id |
Operators
Equality(MarsTrackableId, MarsTrackableId)
Equality operators check if their operands are equal
Declaration
public static bool operator ==(MarsTrackableId id1, MarsTrackableId id2)
Parameters
Type | Name | Description |
---|---|---|
MarsTrackableId | id1 | id 1 |
MarsTrackableId | id2 | id 2 |
Returns
Type | Description |
---|---|
Boolean |
|
Inequality(MarsTrackableId, MarsTrackableId)
Inequality operators check if their operands are equal
Declaration
public static bool operator !=(MarsTrackableId id1, MarsTrackableId id2)
Parameters
Type | Name | Description |
---|---|---|
MarsTrackableId | id1 | Id 1 |
MarsTrackableId | id2 | Id 2 |
Returns
Type | Description |
---|---|
Boolean |
|