Enum TouchPhase | Input System | 1.0.2
docs.unity.cn
    Show / Hide Table of Contents

    Enum TouchPhase

    Indicates where in its lifecycle a given touch is.

    Namespace: UnityEngine.InputSystem
    Syntax
    public enum TouchPhase

    Fields

    Name Description Value
    None

    No activity has been registered on the touch yet.

    0
    Began

    A touch has just begun, i.e. a finger has touched the screen.. Only the first touch input in any given touch will have this phase.

    1
    Moved

    An ongoing touch has changed position.

    2
    Ended

    An ongoing touch has just ended, i.e. the respective finger has been lifted off of the screen. Only the last touch input in a given touch will have this phase.

    3
    Canceled

    An ongoing touch has been cancelled, i.e. ended in a way other than through user interaction. This happens, for example, if focus is moved away from the application while the touch is ongoing.

    4
    Stationary

    An ongoing touch has not been moved (not received any input) in a frame.

    5

    Extension Methods

    InputExtensions.IsEndedOrCanceled()
    InputExtensions.IsActive()
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 22 January 2021