-
Notifications
You must be signed in to change notification settings - Fork 33
Home
XboxCtrlrInput
is a Xbox input wrapper for Unity3D written in C#. It contains a static class called XCI
that is used to get input from an Xbox controller.
For a introductory description of XboxCtrlrInput
, refer to the Description and Goals section of the Readme.
For a step-by-step explanation on how to use XboxCtrlrInput
, refer to the How to Use section of the Readme.
For code documentation, including information about the included enumerations and methods, check out the Coding Reference wiki page. A diagram showing all the labeled Xbox inputs can also be found there.
If you want to find out what currently works (such as button mappings), refer to the What Works wiki page. Compatibility information can also be found there.
XboxCtrlrInput & Vibration:
Because XboxCtrlrInput is targeted at Windows, macOS, and Linux, its goal is to have as many features in common as possible. In brief, controller vibration output (or just "vibration" for short) is only natively available on Windows, and only through the underlying XInput.NET API.
Because of this, XboxCtrlrInput doesn't support vibration on any platform. The only way for such support to exist is that someone has to make Xbox Controller vibration API for macOS and Linux, in C#, to be able to access such a feature. I don't work that deep into input APIs and thus am not capable of doing that.
However, because XboxCtlrInput is open-source, developers could add such functionality for their own projects on Windows. This requires you to understand XCI and XInput.NET methods for accessing the vibration motors.
Please refer to the repo's Issues section for the latest issues.
The XboxCtrlrInput
repo includes the necessary files to get Xbox input in Unity, as mentioned in the How to Use section of the Readme. The repo also includes an example Unity project for demoing the capabilities. Although the essential XboxCtrlrInput
files should work in older versions of Unity, the demo project requires Unity 4.3 or above because it makes use of features that became free in Unity 4.2, including text serialization and shadow rendering.
Get comprehensive information about what's in the demo the Example Unity Project wiki page.
Everything in this repo is Public Domain. Read UNLICENSE.md
for more information.