Struct GestureId
A gesture-unique identifier for gestures. This identifies a single unique gesture across different events.
Namespace: UnityEngine.XR.InteractionSubsystems
Syntax
public struct GestureId : IEquatable<GestureId>
Remarks
Ids are generally unique to a gesture.
A trackable id is a 128 bit number, stored as two ulongs. This makes it large enough to hold a Guid
.
Constructors
GestureId(UInt64, UInt64)
Constructs a GestureId
from two ulong
s.
Declaration
public GestureId(ulong subId1, ulong subId2)
Parameters
Type | Name | Description |
---|---|---|
UInt64 | subId1 | The first half of the id. |
UInt64 | subId2 | The second half of the id. |
Properties
invalidId
Get the invalid id.
Declaration
public static readonly GestureId invalidId { get; }
Property Value
Type | Description |
---|---|
GestureId |
subId1
The first half of the id.
Declaration
public ulong subId1 { get; set; }
Property Value
Type | Description |
---|---|
UInt64 |
subId2
The second half of the id.
Declaration
public ulong subId2 { get; set; }
Property Value
Type | Description |
---|---|
UInt64 |
Methods
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(GestureId)
Test if a given gesture ID is equal to this gesture ID
Declaration
public bool Equals(GestureId other)
Parameters
Type | Name | Description |
---|---|---|
GestureId | other | The gesture ID to test against |
Returns
Type | Description |
---|---|
Boolean | true if the gesture IDs are equal. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Overrides
Operators
Equality(GestureId, GestureId)
Test if two gesture IDs are equal
Declaration
public static bool operator ==(GestureId id1, GestureId id2)
Parameters
Type | Name | Description |
---|---|---|
GestureId | id1 | First gesture ID to test |
GestureId | id2 | Second gesture ID to test |
Returns
Type | Description |
---|---|
Boolean | true if they are equal |
Inequality(GestureId, GestureId)
Test if two gesture IDs are not equal
Declaration
public static bool operator !=(GestureId id1, GestureId id2)
Parameters
Type | Name | Description |
---|---|---|
GestureId | id1 | First gesture ID to test |
GestureId | id2 | Second gesture ID to test |
Returns
Type | Description |
---|---|
Boolean | true if they are not equal |