v1.5 : support for Unity 2019.3 and beyond


There have been a bunch of updates since I last updated this package on itch. Specifically :

features:

  • (v1.5) hinput can now be set up correctly on Unity versions 2019.3 and later. Many people requested this, and I finally found a way to dump hundreds of controls into the new input manager. Note that in some versions of Unity you will need to manually reimport your asset database after setting up hinput.
  • (v1.4) anyGamepad and anyInput will now pretend to be the current pressed gamepad/input. For instance, if you pressed a button on gamepad 2, hinput.anyGamepad.index will return 2. This works with many other properties, such as name, fullName and gamepad. To access the true values of these properties add "internal" in front of their name e.g. internalIndex, internalFullName..
  • (v1.4) Global anyInput. Calling hinput.anyInput will now return a virtual button that is considered pressed if anything is pressed. This is similar to hinput.anyGamepad.anyInput.
  • (v1.4) Uninstall hinput. It is now possible to uninstall hinput the same way you install it (tools > hinput > uninstall hinput). This will clear all hinput entries from your inputManager, but hinput files will remain.
  • (v1.3) Gamepad type. Gamepads now have a "type" field that will tell you what kind of controller you are holding (Xbox, PS4..)
  • (v1.3) inPressedZone property of stick is now a hPressable. This property of sticks, telling you whether they are pushed, switched from being a regular boolean value to a full-fledged button. That means you can access every feature of hPressable, from "justPressed" to long and double presses. You can also write "hinput.gamepad[0].leftStick" to know if it is being pushed in any direction.
  • (v1.3) Button list in gamepads. I added a property called "buttons" to gamepads. It's a list of every button, trigger, bumper and stick click of the gamepad. Each of those buttons also has an "index" property that will return its index in this list. This feature is meant to complement the "sticks" property, so that you can iterate on every input of the gamepads.
  • (v1.3) anyInput in gamepads. You can now listen to any input from a given gamepad. This property is a hPressable, so it behaves like a button and can be pressed, justPressed, etc. It is considered pressed if any button or stick is pressed, and its position is equal to the most-pushed input of the gamepad.
  • (v1.3) Simplified vibrations. Rumble is now much easier to use ! There's only one method called Vibrate, that takes a duration and intensity for both sides. You can omit any of these parameter to replace them with default values, or use no parameter at all !
  • (v1.2.5) hinput.anyGamepad.Vibrate now vibrates all controllers

fixes:

  • (v1.5) Fixed a bug where XInput would sometimes cause conflicts in WebGL builds

  • (v1.5) Fixed a typo causing hinput to not be correctly set up in case-sensitive OSes

  • (v1.5) Set the proper range for triggers on Linux. I had read somewhere that gamepad drivers on Linux returned values between -1 and 1 for triggers, so I lerped it back to the [0,1] range. But that info was wrong and the data was already in [0,1], so I was actually lerping it into the [0.5,1] range.

  • (v1.5) Renamed the menu option from "Setup hinput" to "Set up hinput". Apparently "setup" is a noun, while "set up" is a verb. The more you know.

  • (v1.4) Buttons and triggers won't be considered justReleased on the first frame anymore.
  • (v1.4) Un-invert D-Pads on Mac. This fixes an exotic bug introduced in v1.3.0 that caused up/down and left/right directions of the D-Pad to be inverted, exclusively on Mac.
  • (v1.4) Support for opposite directions on D-Pads. I don't know how you would do that, but pressing up now cancels pressing down on a D-Pad, and vice-versa.
  • (v1.3) hinput now works in WebGL builds. The source of our problems was XInput. If you're making a WebGL project you should either not import the folder from hinput, or delete it. hinput will still work the same, except you won't be able to use vibration.
  • (v1.3) hinput now works with old versions of unity. I replaced all the code that was too recent.
  • (v1.2.4) Stop vibration when exiting play mode. Until now, stopping the game while a gamepad was vibrating would cause the gamepad to keep vibrating indefinitely. That's rather inconvenient, so I changed it.
  • (v1.2.3) hinput no longer prevents Unity from building. The hSetup class uses a custom editor method (the one that triggers the 'setup hinput' menu option). These method prevent Unity from building, that's why you're supposed to add a compiler instruction to omit them when building. Unfortunately I had forgotten about that part. It's now fixed, and I have updated my testing pipeline to make sure it won't happen again.
  • (v1.2.1) hinput will now work the same if you change your project's time scale
  • (v1.2.1) justPressed and justReleased properties will now work a bit less badly if you call them in FixedUpdate

Files

hinput_v1.5.0.unitypackage 632 kB
Mar 29, 2020
hinput_documentation.pdf 197 kB
Mar 29, 2020
hinput_install.pdf 120 kB
Mar 29, 2020
hinput_learn.pdf 200 kB
Mar 29, 2020

Get Hinput

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.