Class InputUserSettings
A user profile may alter select aspects of input behavior at runtime.
Inheritance
Namespace: UnityEngine.InputSystem.Users
Syntax
[Serializable]
public class InputUserSettings
Remarks
This class implements several user adjustable input behaviors commonly found in games, such as mouse sensitivity and axis inversion.
Note that the behaviors only work in combination with actions, i.e. for users that have
actions associated with them via AssociateActionsWithUser(IInputActionCollection).
The behaviors do not alter the input as present directly on the devices. Meaning that, for example,
invertMouseX will not impact
In other words, all the input behaviors operate at the binding level and modify InputBindings. ////REVIEW: does this really make sense?
Properties
customBindings
Customized bindings for the user.
Declaration
public string customBindings { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Remarks
This will only contain customizations explicitly applied to the user's bindings and will not contain default bindings. It is thus not a complete set of bindings but rather just a set of customizations.
invertMouseX
Invert X on
Declaration
public bool invertMouseX { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
invertMouseY
Invert Y on
Declaration
public bool invertMouseY { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
invertStickX
Invert X axis on leftStick and rightStick.
Declaration
public bool invertStickX { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
invertStickY
Invert Y axis on leftStick and rightStick.
Declaration
public bool invertStickY { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
mouseSensitivity
Declaration
public float? mouseSensitivity { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Single> |
mouseSmoothing
Smooth mouse motion on both X and Y ...
Declaration
public float? mouseSmoothing { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Single> |
swapBumpers
Swap leftShoulder and rightShoulder on gamepads.
Declaration
public bool swapBumpers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
swapDpadAndLeftStick
Declaration
public bool swapDpadAndLeftStick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
swapSticks
If true, swap sides
Declaration
public bool swapSticks { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
swapTriggers
Swap leftTrigger and rightTrigger on gamepads.
Declaration
public bool swapTriggers { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
vibrationStrength
Declaration
public float vibrationStrength { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Methods
Apply(IInputActionCollection)
Declaration
public virtual void Apply(IInputActionCollection actions)
Parameters
Type | Name | Description |
---|---|---|
IInputActionCollection | actions |