Class PressInteraction | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class PressInteraction

    Performs the action when a control is actuated past the button press point and then does not perform again until the button is first released and then pressed again.

    Inheritance
    System.Object
    PressInteraction
    Namespace: UnityEngine.InputSystem.Interactions
    Syntax
    public class PressInteraction : IInputInteraction
    Remarks

    The exact trigger behavior can be determined via behavior.

    Note that this interaction is not restricted to controls of type float. Actuation is measured through magnitudes (EvaluateMagnitude() and will thus work with any control that can return a magnitude of actuation.

    Fields

    behavior

    Declaration
    public PressBehavior behavior
    Field Value
    Type Description
    PressBehavior

    pressPoint

    Amount of actuation required before a control is considered pressed.

    Declaration
    public float pressPoint
    Field Value
    Type Description
    System.Single
    Remarks

    If zero (default), defaults to defaultButtonPressPoint.

    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()
    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