Class DualSenseGamepadHID
PS5 DualSense controller that is interfaced to a HID backend.
Inherited Members
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
PauseHaptics()
Declaration
public override void PauseHaptics()
Overrides
ResetHaptics()
Declaration
public override void ResetHaptics()
Overrides
ResumeHaptics()
Declaration
public override void ResumeHaptics()
Overrides
SetLightBarColor(Color)
Declaration
public override void SetLightBarColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color |
Overrides
SetMotorSpeeds(Single, Single)
Declaration
public override void SetMotorSpeeds(float lowFrequency, float highFrequency)
Parameters
Type | Name | Description |
---|---|---|
Single | lowFrequency | |
Single | highFrequency |
Overrides
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.