Reputation: 134
I am developing a unity game and I want to make the light bar on a connected Dualshock controller change color when a player has taken damage. Could someone please inform me of a way to do this, as unity no longer supports this.
I tried to achieve this by using the following namespace and then change the color of the light bar using a method, but soon realized that unity has deprecated this feature a long time ago.
using UnityEngine.InputSystem.DualShock;
Thanks in advance!
EDIT: Unity does in fact support this, just on their NEW input system package___
Thanks!
Upvotes: 1
Views: 1508
Reputation: 340
Try this !
var gamepad = (DualShockGamepad)Gamepad.all[0];
gamepad.SetLightbarColor(Color.red);
from here : https://forum.unity.com/threads/dualshock-4-lightbar.848707/
Edit: Also, you have to be using the "new" input system : https://docs.unity3d.com/Packages/[email protected]/manual/Installation.html
Upvotes: 1