docs.unity3d.com
    Show / Hide Table of Contents

    Class DualSenseGamepadHID

    PS5 DualSense controller that is interfaced to a HID backend.

    Inheritance
    Object
    InputControl
    InputDevice
    Gamepad
    DualShockGamepad
    DualSenseGamepadHID
    Inherited Members
    DualShockGamepad.touchpadButton
    DualShockGamepad.optionsButton
    DualShockGamepad.shareButton
    DualShockGamepad.L1
    DualShockGamepad.R1
    DualShockGamepad.L2
    DualShockGamepad.R2
    DualShockGamepad.L3
    DualShockGamepad.R3
    DualShockGamepad.current
    DualShockGamepad.MakeCurrent()
    DualShockGamepad.OnRemoved()
    Gamepad.buttonWest
    Gamepad.buttonNorth
    Gamepad.buttonSouth
    Gamepad.buttonEast
    Gamepad.leftStickButton
    Gamepad.rightStickButton
    Gamepad.startButton
    Gamepad.selectButton
    Gamepad.dpad
    Gamepad.leftShoulder
    Gamepad.rightShoulder
    Gamepad.leftStick
    Gamepad.rightStick
    Gamepad.leftTrigger
    Gamepad.rightTrigger
    Gamepad.aButton
    Gamepad.bButton
    Gamepad.xButton
    Gamepad.yButton
    Gamepad.triangleButton
    Gamepad.squareButton
    Gamepad.circleButton
    Gamepad.crossButton
    Gamepad.Item[GamepadButton]
    Gamepad.all
    Gamepad.OnAdded()
    InputDevice.InvalidDeviceId
    InputDevice.description
    InputDevice.enabled
    InputDevice.canRunInBackground
    InputDevice.added
    InputDevice.remote
    InputDevice.native
    InputDevice.updateBeforeRender
    InputDevice.deviceId
    InputDevice.lastUpdateTime
    InputDevice.wasUpdatedThisFrame
    InputDevice.allControls
    InputDevice.valueType
    InputDevice.valueSizeInBytes
    InputDevice.ReadValueFromBufferAsObject(Void*, Int32)
    InputDevice.ReadValueFromStateAsObject(Void*)
    InputDevice.ReadValueFromStateIntoBuffer(Void*, Void*, Int32)
    InputDevice.CompareValue(Void*, Void*)
    InputDevice.OnConfigurationChanged()
    InputDevice.ExecuteCommand<TCommand>(TCommand)
    InputDevice.ExecuteCommand(InputDeviceCommand*)
    InputControl.name
    InputControl.displayName
    InputControl.shortDisplayName
    InputControl.path
    InputControl.layout
    InputControl.variants
    InputControl.device
    InputControl.parent
    InputControl.children
    InputControl.usages
    InputControl.aliases
    InputControl.stateBlock
    InputControl.noisy
    InputControl.synthetic
    InputControl.Item[String]
    InputControl.ToString()
    InputControl.EvaluateMagnitude()
    InputControl.EvaluateMagnitude(Void*)
    InputControl.WriteValueFromBufferIntoState(Void*, Int32, Void*)
    InputControl.WriteValueFromObjectIntoState(Object, Void*)
    InputControl.TryGetChildControl(String)
    InputControl.TryGetChildControl<TControl>(String)
    InputControl.GetChildControl(String)
    InputControl.GetChildControl<TControl>(String)
    InputControl.RefreshConfigurationIfNeeded()
    InputControl.RefreshConfiguration()
    InputControl.m_StateBlock
    InputControl.currentStatePtr
    InputControl.previousFrameStatePtr
    InputControl.defaultStatePtr
    InputControl.noiseMaskPtr
    InputControl.stateOffsetRelativeToDeviceRoot
    Namespace: UnityEngine.InputSystem.DualShock
    Syntax
    public class DualSenseGamepadHID : DualShockGamepad, IDualShockHaptics, IDualMotorRumble, IHaptics, IEventMerger, IEventPreProcessor

    Properties

    leftTriggerButton

    Declaration
    public ButtonControl leftTriggerButton { get; protected set; }
    Property Value
    Type Description
    ButtonControl

    playStationButton

    Declaration
    public ButtonControl playStationButton { get; protected set; }
    Property Value
    Type Description
    ButtonControl

    rightTriggerButton

    Declaration
    public ButtonControl rightTriggerButton { get; protected set; }
    Property Value
    Type Description
    ButtonControl

    Methods

    FinishSetup()

    Declaration
    protected override void FinishSetup()
    Overrides
    DualShockGamepad.FinishSetup()

    PauseHaptics()

    Declaration
    public override void PauseHaptics()
    Overrides
    Gamepad.PauseHaptics()

    ResetHaptics()

    Declaration
    public override void ResetHaptics()
    Overrides
    Gamepad.ResetHaptics()

    ResumeHaptics()

    Declaration
    public override void ResumeHaptics()
    Overrides
    Gamepad.ResumeHaptics()

    SetLightBarColor(Color)

    Declaration
    public override void SetLightBarColor(Color color)
    Parameters
    Type Name Description
    Color color
    Overrides
    DualShockGamepad.SetLightBarColor(Color)

    SetMotorSpeeds(Single, Single)

    Declaration
    public override void SetMotorSpeeds(float lowFrequency, float highFrequency)
    Parameters
    Type Name Description
    Single lowFrequency
    Single highFrequency
    Overrides
    Gamepad.SetMotorSpeeds(Single, Single)

    SetMotorSpeedsAndLightBarColor(Nullable<Single>, Nullable<Single>, Nullable<Color>)

    Set motor speeds of both motors and the light bar color simultaneously.

    Declaration
    public bool SetMotorSpeedsAndLightBarColor(float? lowFrequency, float? highFrequency, Color? color)
    Parameters
    Type Name Description
    Nullable<Single> lowFrequency SetMotorSpeeds(Single, Single)
    Nullable<Single> highFrequency SetMotorSpeeds(Single, Single)
    Nullable<Color> color SetLightBarColor(Color)
    Returns
    Type Description
    Boolean

    True if the command succeeded. Will return false if another command is currently being processed.

    Remarks

    Use this method to set both the motor speeds and the light bar color in the same call. This method exists because it is currently not possible to process an input/output control (IOCTL) command while another one is in flight. For example, calling SetMotorSpeeds(Single, Single) immediately after calling SetLightBarColor(Color) might result in only the light bar color changing. The SetMotorSpeeds(Single, Single) call could fail. It is however possible to combine multiple IOCTL instructions into a single command, which is what this method does.

    See SetMotorSpeeds(Single, Single) and SetLightBarColor(Color) for the respective documentation regarding setting rumble and light bar color.

    Extension Methods

    InputControlExtensions.FindInParentChain<TControl>(InputControl)
    InputControlExtensions.IsPressed(InputControl, Single)
    InputControlExtensions.IsActuated(InputControl, Single)
    InputControlExtensions.ReadValueAsObject(InputControl)
    InputControlExtensions.ReadValueIntoBuffer(InputControl, Void*, Int32)
    InputControlExtensions.ReadDefaultValueAsObject(InputControl)
    InputControlExtensions.ReadValueFromEventAsObject(InputControl, InputEventPtr)
    InputControlExtensions.WriteValueFromObjectIntoEvent(InputControl, InputEventPtr, Object)
    InputControlExtensions.WriteValueIntoState(InputControl, Void*)
    InputControlExtensions.WriteValueIntoState<TValue>(InputControl, TValue, Void*)
    InputControlExtensions.WriteValueIntoEvent<TValue>(InputControl, TValue, InputEventPtr)
    InputControlExtensions.CopyState(InputDevice, Void*, Int32)
    InputControlExtensions.CopyState<TState>(InputDevice, out TState)
    InputControlExtensions.CheckStateIsAtDefault(InputControl)
    InputControlExtensions.CheckStateIsAtDefault(InputControl, Void*, Void*)
    InputControlExtensions.CheckStateIsAtDefaultIgnoringNoise(InputControl)
    InputControlExtensions.CheckStateIsAtDefaultIgnoringNoise(InputControl, Void*)
    InputControlExtensions.CompareStateIgnoringNoise(InputControl, Void*)
    InputControlExtensions.CompareState(InputControl, Void*, Void*, Void*)
    InputControlExtensions.CompareState(InputControl, Void*, Void*)
    InputControlExtensions.HasValueChangeInState(InputControl, Void*)
    InputControlExtensions.HasValueChangeInEvent(InputControl, InputEventPtr)
    InputControlExtensions.GetStatePtrFromStateEvent(InputControl, InputEventPtr)
    InputControlExtensions.ResetToDefaultStateInEvent(InputControl, InputEventPtr)
    InputControlExtensions.FindControlsRecursive<TControl>(InputControl, IList<TControl>, Func<TControl, Boolean>)
    In This Article
    • Properties
      • leftTriggerButton
      • playStationButton
      • rightTriggerButton
    • Methods
      • FinishSetup()
      • PauseHaptics()
      • ResetHaptics()
      • ResumeHaptics()
      • SetLightBarColor(Color)
      • SetMotorSpeeds(Single, Single)
      • SetMotorSpeedsAndLightBarColor(Nullable<Single>, Nullable<Single>, Nullable<Color>)
    • Extension Methods
    Back to top
    Terms of use
    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