docs.unity.cn

Input System 1.3.0

    Show / Hide Table of Contents

    Class SlowTapInteraction

    Performs the action if the control is pressed and held for at least the set duration (which defaults to defaultSlowTapTime) and then released.

    Inheritance
    Object
    SlowTapInteraction
    Namespace: UnityEngine.InputSystem.Interactions
    Syntax
    public class SlowTapInteraction : object, IInputInteraction

    Fields

    duration

    The time in seconds within which the control needs to be pressed and released to perform the interaction.

    Declaration
    public float duration
    Field Value
    Type Description
    Single
    Remarks

    If this value is equal to or smaller than zero, the input system will use (defaultSlowTapTime) instead.

    pressPoint

    The press point required to perform the interaction.

    Declaration
    public float pressPoint
    Field Value
    Type Description
    Single
    Remarks

    For analog controls (such as trigger axes on a gamepad), the control needs to be engaged by at least this value to perform the interaction. If this value is equal to or smaller than zero, the input system will use (defaultButtonPressPoint) instead.

    Methods

    Process(ref InputInteractionContext)

    Declaration
    public void Process(ref InputInteractionContext context)
    Parameters
    Type Name Description
    InputInteractionContext context
    Implements
    IInputInteraction.Process(ref InputInteractionContext)

    Reset()

    Declaration
    public void Reset()
    Implements
    IInputInteraction.Reset()
    In This Article
    • Fields
      • duration
      • pressPoint
    • Methods
      • Process(ref InputInteractionContext)
      • Reset()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Wednesday, January 5, 2022
    Terms of use