Add XBox controller mapping input keys to your Makinom project.
This’ll add input key data assets to your project.
Adding the setup #
Before importing the setup into your Unity project, make sure you’ve got Makinom imported in it. You’ll need at least Makinom 2.1.0.
The input keys will be imported into Assets/Gaming Is Love/_Data/Input Key/ and will be available after importing.
Please open the Makinom editor after import and save once to make sure the references to the new input keys are saved in the project.
Input Manager Setup #
The left stick (LS), right stick (RS), D-Pad and left/right triggers require a Unity Input Manager setup. You can open the Unity Input Manager via Edit > Project Settings > Input Manager.
The following axes have to be added to the input manager:
XBox LS Horizontal #
- Type: Joystick Axis
- Axis: X axis
XBox LS Vertical #
- Invert: Enabled
- Type: Joystick Axis
- Axis: Y axis
XBox RS Horizontal #
- Type: Joystick Axis
- Axis: 4th axis
XBox RS Vertical #
- Invert: Enabled
- Type: Joystick Axis
- Axis: 5th axis
XBox D-Pad Horizontal #
- Type: Joystick Axis
- Axis: 6th axis
XBox D-Pad Vertical #
- Type: Joystick Axis
- Axis: 7th axis
XBox Left Trigger #
- Type: Joystick Axis
- Axis: 9th axis
XBox Right Trigger #
- Type: Joystick Axis
- Axis: 10th axis
Alternative Setup #
Alternatively, you can also copy the following data into your project’s InputManager.asset file. The file is located in the ProjectSettings folder of your Unity project.
Just add the data after the last data of the file – make sure to close and reopen the Unity editor to get the renewed setup.
- serializedVersion: 3 m_Name: XBox LS Horizontal descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 0 joyNum: 0 - serializedVersion: 3 m_Name: XBox RS Horizontal descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 3 joyNum: 0 - serializedVersion: 3 m_Name: XBox D-Pad Horizontal descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 5 joyNum: 0 - serializedVersion: 3 m_Name: XBox Left Trigger descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 8 joyNum: 0 - serializedVersion: 3 m_Name: XBox LS Vertical descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 1 type: 2 axis: 1 joyNum: 0 - serializedVersion: 3 m_Name: XBox RS Vertical descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 1 type: 2 axis: 4 joyNum: 0 - serializedVersion: 3 m_Name: XBox D-Pad Vertical descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 6 joyNum: 0 - serializedVersion: 3 m_Name: XBox Right Trigger descriptiveName: descriptiveNegativeName: negativeButton: positiveButton: altNegativeButton: altPositiveButton: gravity: 0 dead: 0.19 sensitivity: 1 snap: 0 invert: 0 type: 2 axis: 9 joyNum: 0