Struct TouchHistory
A fixed-size buffer of Touch records used to trace the history of touches.
Namespace: UnityEngine.InputSystem.EnhancedTouch
Assembly: Unity.InputSystem.dll
Syntax
public struct TouchHistory : IReadOnlyList<Touch>, IReadOnlyCollection<Touch>, IEnumerable<Touch>, IEnumerable
Remarks
This struct provides access to a recorded list of touches.
Properties
Count
Number of history records available.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
this[int]
Return a history record by index. Indexing starts at 0 == newest to Count - 1 == oldest.
Declaration
public Touch this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of history record. |
Property Value
Type | Description |
---|---|
Touch |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
|
Methods
GetEnumerator()
Enumerate touches in the history. Goes from newest records to oldest.
Declaration
public IEnumerator<Touch> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<Touch> | Enumerator over the touches in the history. |