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

    Class InputUserSettings

    A user profile may alter select aspects of input behavior at runtime.

    Inheritance
    System.Object
    InputUserSettings
    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 of but will rather impact the value read out with ReadValue(Void*, Int32) from an action bound to mouse deltas.

    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 and .

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

    invertMouseY

    Invert Y on and .

    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
    In This Article
    • Properties
      • customBindings
      • invertMouseX
      • invertMouseY
      • invertStickX
      • invertStickY
      • mouseSensitivity
      • mouseSmoothing
      • swapBumpers
      • swapDpadAndLeftStick
      • swapSticks
      • swapTriggers
      • vibrationStrength
    • Methods
      • Apply(IInputActionCollection)
    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