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.
Properties
actionUpdateMode
Declaration
public InputSettings.ActionUpdateMode actionUpdateMode { get; set; }
Property Value
Type | Description |
---|---|
InputSettings.ActionUpdateMode |
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
Declaration
public float defaultDeadzoneMax { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
See Also
defaultDeadzoneMin
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 |
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
timesliceEvents
If enabled, any given input event will only be processed for any given fixed or dynamic update if it has been generated before or within the time slice allotted to the update.
Declaration
public bool timesliceEvents { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Normally, the input system will directly consume any input that's available regardless of when it was produced.
updateMode
Determine how the input system updates, i.e. processing pending input events.
Declaration
public InputSettings.UpdateMode updateMode { get; set; }
Property Value
Type | Description |
---|---|
InputSettings.UpdateMode |