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
    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.

    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.

    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.

    Moved

    An ongoing touch has changed position.

    None

    No activity has been registered on the touch yet.

    Stationary

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

    Extension Methods

    InputExtensions.IsEndedOrCanceled()
    InputExtensions.IsActive()
    Back to top Copyright © 2023 Unity Technologies
    Generated by DocFX
    on 27 March 2023
    Terms of use