docs.unity3d.com
    Show / Hide Table of Contents

    Class InputHelpers

    Helper class for different kinds of input.

    Inheritance
    Object
    InputHelpers
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public static class InputHelpers : object

    Methods

    IsPressed(InputDevice, InputHelpers.Button, out Boolean, Single)

    Checks whether button is pressed or not.

    Declaration
    public static bool IsPressed(this InputDevice device, InputHelpers.Button button, out bool isPressed, float pressThreshold = null)
    Parameters
    Type Name Description
    InputDevice device

    The input device.

    InputHelpers.Button button

    The button that is being checked.

    Boolean isPressed

    A boolean that will be true if button is pressed and false if not.

    Single pressThreshold

    The threshold of what defines a press.

    Returns
    Type Description
    Boolean

    Returns true if device and button are valid. Otherwise, returns false.

    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