Struct TouchHistory | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct TouchHistory

    A fixed-size buffer of Touch records used to trace the history of touches.

    Namespace: UnityEngine.InputSystem.EnhancedTouch
    Syntax
    public struct TouchHistory : IReadOnlyList<Touch>, IReadOnlyCollection<Touch>, IEnumerable<Touch>, IEnumerable

    Properties

    Count

    Number of history records available.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Item[Int32]

    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
    System.Int32 index

    Index of history record.

    Property Value
    Type Description
    Touch
    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    index is less than 0 or >= Count.

    Methods

    GetEnumerator()

    Enumerate touches in the history. Goes from newest records to oldest.

    Declaration
    public IEnumerator<Touch> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<Touch>

    Enumerator over the touches in the history.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023