CMZTECH.NET
  • Blog
  • Graphics
  • Virtual Reality
  • 3D Printing
  • Fun Stuff
  • Contact

Unity GamePad mapping Issues

10/18/2014

0 Comments

 
Six months ago I wrote a controller wrapper for GamePads for Unity so that you could use an XBox360 controller on windows and any old gamepad on Android.  I got it all working, wrote an article on it and shipped the code on Github.  Fast forward to yesterday and I get a wild hair to do some Unity development.  I'd been meaning to try the inControl input manager from Gallant Games for some time.  It has better features than my effort and is more actively maintained.  It's a great product and well worth the price ($25) if you are developing with Unity and need to support gamepads.  Highly recommended!!
But this blog isn't about that....

Vuja de

Doing the same stupid thing over and over again.  Here are some things I learned six months ago, that I relearned this week.  I wish i'd written this stuff down before!


USB OTG cables SUCK
An OTG cable cans still provide power when the data lines are fragged.  When you connect your Android it should show up in device manager.  If it doesn't, its new cable time.  Go for short but high quality cables and expect them to last about 2 weeks tops during development.

If the GamePad starts acting weird, restart Unity
This shouldn't be the case but sadly it is.  Sometimes you even have to restart the PC too.  Its annoying, hopefully they will fix this in 5.

The Logitech F710 is weird
This controller seems to cause problems with my PCs, both of them so I avoid using it.  I use a generic AfterGlow 360 controller on the PC and either a Nyko playpad pro or NVIDIA Shield portable for Android.
Whatever, if you use one of these, keep it set in X (xinput) and not the D(direct input) mode.
I also had to copy the XInputInterface.dll into my Unity project to get this working in the editor, although it works fine in the actual player.

Android SDK and Unity Versions
I had a problem where AAPT (Android Asset Packaging Tool) was crashing. I used the SDK manager to uninstall several versions of the Android Build tools until it started working.  I think version 20 was the first version that worked.


0 Comments



Leave a Reply.

    David Coombes

    Making stuff

    Categories

    All
    3D Graphics
    3D Printing
    3D Scanning
    AI
    Blender
    Cycling
    Development
    Environment
    Futurism

    Archives

    January 2021
    November 2020
    May 2020
    April 2020
    March 2020
    February 2020
    December 2019
    November 2019
    September 2019
    August 2019
    July 2019
    January 2019
    December 2018
    October 2018
    August 2018
    June 2018
    April 2018
    March 2018
    February 2018
    January 2018
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    January 2017
    September 2016
    August 2016
    July 2016
    May 2016
    April 2016
    March 2016
    December 2015
    November 2015
    August 2015
    July 2015
    June 2015
    April 2015
    March 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014

    RSS Feed