Steam Controller Not Registering as a Joystick
My game uses cInput to check for which controller the player is using, and adjusts the key mappings accordingly. Everything works just fine for PS3, PS4, Xbox 360, and Xbox One.
But when I try to check for the name of the Steam controller input using:
Input.GetJoystickNames ()
I'm not getting anything. Have any of you guys encountered this before? Thank you!
Answer by pengo · Jan 19, 2017 at 02:09 AM
If you simply launch Unity from Steam then the Steam Controller should show up as an XBOX 360 controller, but the Steam overlays will have problems.
Setting the controller's base desktop configuration to "Gamepad" and launching Unity in the normal way does not work. It does not show up as a controller in Unity. "The Steam Controller is not a standard HID device and cannot be seen by the OS without Steam being initialized for your process through the Steam API with Steam running in the background. It is not possible to use the Steam Controller without Steam. " (via rewired's troubleshooting guide)
If you want to natively support the Steam Controller, you will need to use the Steamworks SDK (or a wrapper for Unity like Steamworks.NET or Ludosity's Steamworks Wrapper). This will also give you access to raw motion data, to set the controller LED color on supported controllers, trigger a haptic pulse, etc.
Steps to launch Unity from Steam:
In Steam "Add a Non-Steam Game to My Library" and add Unity
Launch Unity from your library
Your Steam Controller should now show up as "Controller (XBOX 360 For Windows)" when you use
Input.GetJoystickNames()
The Steam controller overlay is a mess though. Here's what they say in this FAQ (note it also applies to simply launching Unity from Steam):
Can Steamworks.NET be used within the Unity Editor?
Yes absolutely!
The only downside is the Steam Overlay does not function well or even often at all within the editor due to the number of unique windows, so keep that in mind when testing out aspects of Steamworks that require the Overlay to be available such as the Steam Controller or Microtransactions.
So, getting the Steam Controller to show up is as simple as launching Unity from Steam. Native support is also possible with additional libraries (e.g. Steamworks.NET). But either way, development is difficult due to flaky Steam overlay support within Unity.
I only tested this on Windows 10 and Unity 5.5 (64bit). I know it's a year old question but it came up top of google when I was researching the same thing.
Answer by teodoro4 · Jan 22, 2016 at 10:28 PM
Nevermind, I found that the Steam controller (even when configured inside of Steam to emulate the Xbox 360 controller) is not registered as a joystick because it's simple using the PCs standard inputs.
Example:
B button = Space
Answer by Ava42 · Dec 29, 2020 at 01:56 PM
steam input through facepunch: https://wiki.facepunch.com/steamworks/Installing_For_Unity
Your answer
Follow this Question
Related Questions
Contollers are unusable when already plugged in when starting build/editor 0 Answers
Unity New Input System stops working when activating Steamworks.net 2 Answers
Getting Raw Input Data From Controller 0 Answers
Joystick Input from Switch Pro Controller 0 Answers
Joystick 3rd Axis problem on Linux 0 Answers