Class InputSettings
Project-wide input settings.
Inheritance
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
Sensors affected by this setting are Accelerometer,
See Also
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
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
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
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,