XBox One Bluetooth controller support

Hi,

What is the state of XBox One Bluetooth controller support in Unity? It looks like in another thread that it is not there yet and a third-party asset is required (but this seems like a stop-gap solution at best if other controllers are to be supported as well).

I managed to finally pair my XBox controller with the HoloLens and notice that Windows apps (such as the Settings application itself) respond to D-pad input but my Unity-based project does not. When running in the editor on a Windows 10 PC, the controller works flawlessly. It's not just a matter of axes being remapped -- none of the buttons or axes seem to work.

Is there any plan for a future HTP build of Unity to resolve this?

Thank you,

Bart

Did you enable Human Interface Device and Bluetooth capabilities? Which build are you on?

Thank you, that was the problem! The D-pad and shoulder trigger mappings are different than in the Unity editor but I think this is a known issue. I am using build 5.4.0f3.

Which OS build are you on? For both device and PC that runs the editor? That has been a known change in the way Windows handles mappings in Windows 10 Anniversary update (build 14393). Other than that, there aren’t any known issues.

I’m on build 14393.222 (Version 1607, Win 10 Pro). I’ve also updated to the latest Windows Holographic build on HoloLens but the issue does not appear to be fixed.

And what’s the version number of that holographic build? Does the mapping problem happens if you deploy the application to your local machine rather than hololens?

Windows version 14393.187.x86fre.rs1_release_inmarket.160906-1818

I’m not sure by what you mean when you say deploy to my ‘local machine’. Do you mean generating a build to run on a Windows PC? I’m not sure how to do that (I’m guessing that everything I’ve #ifdef’ed to work in the Unity editor has to be used). What I do now is run in the editor on my Windows 10 machine and then test in the emulator and deploy to an actual HoloLens.

Unfortunately, in the emulator, I can’t get the controller to be recognized at all. And on the actual device, the mapping of the shoulder trigger and d-pad axes appears to be different.

Instead of selecting “Remote Machine” in deployment settings, select “Local Machine”:

2816206--204850--upload_2016-10-10_10-45-23.png

Although it builds, I cannot run it in this mode:

Severity    Code    Description    Project    File    Line    Suppression State    Tool
Error        DEP0700 : Registration of the app failed. Deployment Register operation with target volume C: on Package Demo-Holocopter_1.0.0.0_x86__pzq3xp76mxafg from:  (AppxManifest.xml)  failed with error 0x80073CFD. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues. (0x80073cfd)    Demo-Holocopter

By the way, if I understand correctly, the HTP builds of Unity are no longer the latest for HoloLens and the regular 5.5 betas should be used. Could it be that my version of Unity (5.4.0f3) needs to be updated to a 5.5 release?

Is Windows developer mode enabled in settings?

2817199--204938--upload_2016-10-11_10-12-56.png

Yes, it definitely is. Just checked. (Without this, I don’t think it’s even possible to deploy to the device.)

Are you able to reduce the controller differences issue to a separate small project that could be shared with us for investigation?

Controller support into the HoloToolkit-Unity is currently being reviewed.

https://github.com/Microsoft/HoloToolkit-Unity/pull/205

Could you make that into a project and submit it as a bug report? It's not really clear from that link alone what we should look at exactly.

It's a pull request for controller support into the HoloToolkit-Unity

Uhh sorry. Somehow misread your username and thought it was the OP who linked that as some kind of bug explanation.

Sorry for the delayed response but I just found some time to put together a very minimal project. You can see that under Input Settings, I've added "LeftTrigger" and "RightTrigger" as 9th and 10th axes, respectively. This configuration allows me to use the trigger buttons in the Unity editor. On the actual device, however, this leaves RT at 1 by default and it looks like the D-pad is mapped in some weird way to RT. One of the D-pad directions even produces a reading of 0.43 (?) on RT, even though it's a digital axis.

Let me know if you have any trouble getting this project to run. It's available at: http://www.trzy.org/tmp/ControllerDemo.zip

Can you submit it as a bug report through the editor? Just so it doesn't get lost.

Yup – just submitted it. Thank you!