-
Notifications
You must be signed in to change notification settings - Fork 328
NEW: Support Xbox controllers over USB using native macOS support [ISXB-1547] #2179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
(running formatter locally now :) ) |
|
Did not forget this one, will try to review it today/tomorrow |
Pauliusd01
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, checked that the controller is recognised and works correctly both in bluetooth/wired modes in Playmode, Player and the Input debugger. Also, double checked that nothing broke with the other controllers as well.
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop #2179 +/- ##
===========================================
+ Coverage 67.78% 67.80% +0.01%
===========================================
Files 367 367
Lines 53505 53513 +8
===========================================
+ Hits 36268 36282 +14
+ Misses 17237 17231 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
|
@Pauliusd01 thanks for the review! would you be able to hit the Merge button? I don't seem to have access... |
|
@vallerieknight-unity Gave you access, should be able to merge now. But lets wait for a dev review as well @jfreire-unity |
|
Oops! Missed that second review was still yellow... |
jfreire-unity
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding this, and I apologize for taking so long to approve it.
Meanwhile, I did try to test improvements to our Xbox situation on macOS, but I still did not have time to finish it. It's better to merge this now and remove our device state boilerplate later.
|
no worries, nothing to apologize for :) I'm on holiday for the next few days but will merge when I get back |
|
@vallerieknight-unity I can probably merge once CI passes |
|
@vallerieknight-unity this is amazing. Thank you so much for that! Any chance this is extended to DualSense, DualShock and Xbox controllers connected via Bluetooth to use native Apple APIs? We are waiting for years to get macOS fixes to be have controllers working again for macOS builds submitted to the Apple App Store (bug report: IN-30718). |
Hi @Pillmatic :) To clarify, this doesn't change the approach on macOS; we are still reading the raw HID data rather than using If it's helpful, the following setup in Xcode is (classic developer phrase) working on my end with a Sony DualShock 4. Without the USB access in App Sandbox, controller support is non-functional.
If this doesn't solve the issue for you, please make a thread on Unity Discussions (https://discussions.unity.com) and link it here (if only so it's easier for other folks to find). Cheers! |
|
Hi, Thanks for the info. Can confirm with the USB checkbox on controllers work on macOS TestFlight builds. Hope you still migrate to the Apple GameController framework for additional features (e.g., DualSense triggers, lightbar). But this already helps us a lot for internal testing and unblocks us from a potential macOS release. Again, thanks for the support! |

Description
Adds Xbox controller support back on macOS, now using macOS's new(ish) native support for Xbox controllers, rather than requiring usage of a 3rd party driver.
Testing status & QA
Overall Product Risks
_Please rate the potential complexity and halo effect from low to high for the reviewers. Note down potential risks to specific Editor branches
Comments to reviewers
#devs-inputChecklist
Before review:
Changed,Fixed,Addedsections.Area_CanDoX,Area_CanDoX_EvenIfYIsTheCase,Area_WhenIDoX_AndYHappens_ThisIsTheResult.During merge:
NEW: ___.FIX: ___.DOCS: ___.CHANGE: ___.RELEASE: 1.1.0-preview.3.After merge: