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

    Class InputSettings

    Project-wide input settings.

    Inheritance
    System.Object
    InputSettings
    Namespace: UnityEngine.InputSystem
    Syntax
    public class InputSettings : ScriptableObject
    Remarks

    Several aspects of the input system can be customized to tailor how the system functions to the specific needs of a project. These settings are collected in this class. There is one global settings object active at any one time. It can be accessed and set through settings.

    Changing a setting on the object takes effect immediately. It also triggers the onSettingsChange callback.

    Properties

    compensateForScreenOrientation

    If true, sensors that deliver rotation values on handheld devices will automatically adjust rotations when the screen orientation changes.

    Declaration
    public bool compensateForScreenOrientation { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    This is enabled by default.

    If enabled, rotation values will be rotated around Z. In , values remain unchanged. In , they will be rotated by 180 degrees. In by 90 degrees, and in by 270 degrees.

    Sensors affected by this setting are Accelerometer, , and Gyroscope.

    See Also
    UnityEngine.InputSystem.Processors.CompensateDirectionProcessor

    defaultButtonPressPoint

    Declaration
    public float defaultButtonPressPoint { get; set; }
    Property Value
    Type Description
    System.Single

    defaultDeadzoneMax

    Default value used when nothing is set explicitly on max or UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor.max.

    Declaration
    public float defaultDeadzoneMax { get; set; }
    Property Value
    Type Description
    System.Single
    See Also
    StickDeadzoneProcessor
    UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor

    defaultDeadzoneMin

    Default value used when nothing is set explicitly on min or UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor.min.

    Declaration
    public float defaultDeadzoneMin { get; set; }
    Property Value
    Type Description
    System.Single
    See Also
    StickDeadzoneProcessor
    UnityEngine.InputSystem.Processors.AxisDeadzoneProcessor

    defaultHoldTime

    Declaration
    public float defaultHoldTime { get; set; }
    Property Value
    Type Description
    System.Single

    defaultSlowTapTime

    Declaration
    public float defaultSlowTapTime { get; set; }
    Property Value
    Type Description
    System.Single

    defaultTapTime

    Declaration
    public float defaultTapTime { get; set; }
    Property Value
    Type Description
    System.Single

    filterNoiseOnCurrent

    Declaration
    public bool filterNoiseOnCurrent { get; set; }
    Property Value
    Type Description
    System.Boolean

    multiTapDelayTime

    Declaration
    public float multiTapDelayTime { get; set; }
    Property Value
    Type Description
    System.Single

    supportedDevices

    List of device layouts used by the project.

    Declaration
    public ReadOnlyArray<string> supportedDevices { get; set; }
    Property Value
    Type Description
    ReadOnlyArray<System.String>
    Remarks

    This would usually be one of the high-level abstract device layouts. For example, for a game that supports touch, gamepad, and keyboard&mouse, the list would be { "Touchscreen", "Gamepad", "Mouse", "Keyboard" }. However, nothing prevents the the user from adding something a lot more specific. A game that can only be played with a DualShock controller could make this list just be { "DualShockGamepad" }, for example.

    In the editor, we use the information to filter what we display to the user by automatically filtering out irrelevant controls in the control picker and such.

    The information is also used when a new device is discovered. If the device is not listed as supported by the project, it is ignored.

    The list is empty by default. An empty list indicates that no restrictions are placed on what devices are supported. In this editor, this means that all possible devices and controls are shown.

    See Also
    InputControlLayout

    tapRadius

    Declaration
    public float tapRadius { get; set; }
    Property Value
    Type Description
    System.Single

    updateMode

    Determine how the input system updates, i.e. processes pending input events.

    Declaration
    public InputSettings.UpdateMode updateMode { get; set; }
    Property Value
    Type Description
    InputSettings.UpdateMode
    Remarks

    By default, input updates will automatically be triggered

    In the editor,

    See Also
    Update()

    See Also

    settings
    onSettingsChange
    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