docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TrackPadTouch

    A touch event received from a magic trackpad.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.Core
    Assembly: Unity.AppUI.dll
    Syntax
    public struct TrackPadTouch
    Remarks

    Theses Touch events can be received from a magic trackpad on macOS.

    Constructors

    TrackPadTouch(int, Vector2, int, Vector2, float, TouchPhase)

    Constructor.

    Declaration
    public TrackPadTouch(int fingerId, Vector2 position, int tapCount, Vector2 deltaPos, float deltaTime, TouchPhase phase)
    Parameters
    Type Name Description
    int fingerId

    The unique identifier of the touch.

    Vector2 position

    The position of the touch in normalized coordinates.

    int tapCount

    The number of taps. This is always 1 for a trackpad.

    Vector2 deltaPos

    The delta position of the touch since the last frame.

    float deltaTime

    The delta time since the last frame.

    TouchPhase phase

    The phase of the touch.

    Properties

    deltaPos

    The delta position of the touch since the last frame.

    Declaration
    public readonly Vector2 deltaPos { get; }
    Property Value
    Type Description
    Vector2

    deltaTime

    The delta time since the last frame.

    Declaration
    public readonly float deltaTime { get; }
    Property Value
    Type Description
    float

    fingerId

    The unique identifier of the touch.

    Declaration
    public readonly int fingerId { get; }
    Property Value
    Type Description
    int

    phase

    The phase of the touch.

    Declaration
    public readonly TouchPhase phase { get; }
    Property Value
    Type Description
    TouchPhase

    position

    The position of the touch in normalized coordinates.

    Declaration
    public readonly Vector2 position { get; }
    Property Value
    Type Description
    Vector2

    tapCount

    The number of taps. This is always 1 for a trackpad.

    Declaration
    public readonly int tapCount { get; }
    Property Value
    Type Description
    int
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)