Struct MarsTrackableId
A unique identifier for trackable data in MARS - mirrors UnityEngine.Experimental.XR.TrackableId
Implements
Inherited Members
Namespace: Unity.MARS.Data
Assembly: Unity.MARS.Interfaces.dll
Syntax
[Serializable]
[MovedFrom("Unity.MARS")]
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(ulong, ulong)
Create a unique identifier for trackable data in MARS
Declaration
public MarsTrackableId(ulong idOne, ulong idTwo)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | idOne | Id 1 |
| ulong | 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 |
|---|---|
| ulong |
subId2
The second sub-component of the id.
Declaration
public ulong subId2 { get; }
Property Value
| Type | Description |
|---|---|
| ulong |
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 |
|---|---|
| bool |
Overrides
Equals(MarsTrackableId)
Declaration
public bool Equals(MarsTrackableId other)
Parameters
| Type | Name | Description |
|---|---|---|
| MarsTrackableId | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
ToString()
Generates a nicely formatted version of the id
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string unique to this id |
Overrides
Operators
operator ==(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 |
|---|---|
| bool |
|
operator !=(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 |
|---|---|
| bool |
|