Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Free] Custom Input Manager

Discussion in 'Assets and Asset Store' started by daemon3000, Jan 18, 2014.

  1. Mikerenyi

    Mikerenyi

    Joined:
    Jan 5, 2013
    Posts:
    10
    Hey Daemon!

    Thanks again for making this great tool, it's definitely a huge issue that unity doesn't have changing input support at runtime. Have a quick question about how the runtime input binding is set up in the example_1 scene.

    Basically I'm trying to change a key at runtime, it's suppose to be a keyboard press, but whenever I click the input field, it automatically sets to Mouse0, without scanning for another keypress. How do you get it to scan for the keypress without it automatically setting the mouse click?

    Thanks!
     
    Last edited: Apr 21, 2015
  2. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    What Unity version are you using?
    What target platform did you select in the Build Settings window?
    Are you using the the 4.6 UI? Did you go to TeamUtility/InputManager and selected Use Custom Input Module?
    Does this happen in the example scene or in your custom scene? Maybe you didn't configure something correctly.
    If you're running a custom scene, do you use the LoadInputOnStart and SaveInput components that come with the examples?

    This appears to be a bug. You are not the first person this happened to but I wasn't able to replicate it on my computer.
    The other user solved the issue by deleting the input manager game-object and creating it again. If you are using the LoadInputOnStart and SaveInput components make sure to also delete the input saves. They are saved in Application.persistentDataPath.
     
  3. Mikerenyi

    Mikerenyi

    Joined:
    Jan 5, 2013
    Posts:
    10
    This solved it! :)

    I had originally tried copying the input manager from the example scene to a new scene, but deleting and re-creating a input manager on the new scene solved it. Maybe the old input manager isn't refreshing the Rebind input.

    Thanks again. This is a wonderful tool and I look forward to what you do next!

    Running: Unity 5.0.0f4
    Target platform: Windows
     
  4. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    How did you try to copy the input manager? Did you use the Export/Import options in the advanced editor? Did you duplicate the scene? Did you make the input manager a prefab and then instantiate it in the new scene?
     
  5. Mikerenyi

    Mikerenyi

    Joined:
    Jan 5, 2013
    Posts:
    10
    Hey Daemon,

    I copied (control+c) and pasted (control+v) the input manager and move_forward_input from the example scene into the hierarchy of a new scene. I'm at work right now and don't have the project files, but let me know if you need more information and I'll try and get it to you when I get home. Thanks!
     
  6. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    So I tracked down the source of this issue and it seems to happen only when you create an "EventSystem" game-object(GameObject/UI/Event System) after you created an input manager game-object.

    When you create the input manager game-object before the "EventSystem" game-object, the InputManager script will receive the mouse events one frame after the event system so by the time the mouse events are received the "rebind" UI button has already been pressed and the input scan has already been started which causes the Mouse0 key to be immediately selected.

    The solution to this problem is to just create the two game-objects in the correct order.
    Alternatively, you can edit the rebind script to delay the input scanning by one frame using a coroutine.

    I already updated the example scripts to do this so you should get the newest changes.
     
  7. Mikerenyi

    Mikerenyi

    Joined:
    Jan 5, 2013
    Posts:
    10
    Absolutely incredible! Thanks so much, the updated scripts work perfectly. It's talented contributors like yourself that really make the community an awesome place to be! :D
     
  8. winxalex

    winxalex

    Joined:
    Jun 29, 2014
    Posts:
    166
    Also open source heavy weight solution
     
  9. xenonsin

    xenonsin

    Joined:
    Dec 12, 2013
    Posts:
    20
    Is it possible if you can add a context menu when you right click Input Configurations or Axis Configurations in the Hiearchy Panel so that you can add new configs, or copy and paste easily?
     
  10. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    Do you mean Inspector Panel? You can left-click on the axis/input configuration foldout to highlight it then press Delete to delete it or Ctrl(Cmd) + D to create a copy of it.
     
  11. DreamCore90

    DreamCore90

    Joined:
    Dec 16, 2014
    Posts:
    21
    This does not seem to be working with Unity 5.x. The console spams tons of errors like:

    ArgumentException: An axis named 'joy_0_axis_0' does not exist in the active input configuration
    StackOverflowException: The requested operation caused a stack overflow

    and eventually the editor crashes.
     
  12. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    Go to the TeamUtility/Input Manager menu and select Open Advanced Editor. In the advanced editor go to the File dropdown and select Overwrite Input Settings.
     
  13. Alexander-Perrin

    Alexander-Perrin

    Joined:
    Sep 6, 2012
    Posts:
    4
    Hey!

    What method would you recommend for managing multiple joystick inputs (eg, 2-4 players using xbox controllers)? At the moment I've just got axes name and mapped to each individual joystick (ie, Horizontal1, Horizontal2 etc) but it's a lot to maintain. Is there a simpler way to request input from a specified joystick without having to make 4 copies of each axis?

    Loving your work so far, thanks!
     
  14. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    There is no other way to do it at the moment. Submit your request here and I'll see if I can find a solution for it this weekend.
     
  15. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    I have a solution for your problem. Get the newest version from Github and you'll find a new script named CloneControllerConfiguration. Add it to the same game-object with the InputManager script.

    The script works by going through all the axes in an input configuration at runtime, cloning them and changing the joystick and keycodes. This way you only have to maintain one set of axes. For the axis to be cloned its name must end in "_P1" and the key codes must be from the Joystick1ButtonX set or None.

    The script has two parameters: the name of an input configuration and the number of clones you want to make.

    In your player input script you can do something like InputManager.GetAxis("Horizontal_P" + playerID) where playerID is an integer you can set in the inspector or through code for each player instance.
     
  16. TheCaptainJuneBug

    TheCaptainJuneBug

    Joined:
    Sep 29, 2013
    Posts:
    9
    First of thank you so much for this awesome input manager!
    But i am only having one problem so far and I cant seem to figure it out. So the problem im having is, when i toggling between the different input devices. So i have a input manager and adapter in the scene. When i touch a button on my xbox one controller it changes input devices to joystick. But when i push the keyboard nothing happens, but if i move my mouse arround it changes to keyboardandmouse. But then once i stop moving the mouse it goes back to joystick. I havent modified anything.
     
  17. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    I tested example #2 - Input Adapter with an XBox 360 controller and it worked fine so maybe you didn't set something up correctly. Try to increase the dead-zone for the analog sticks. Maybe they return some small value even when you don't touch them so it triggers an input device change.
     
  18. SnickersDaBunny

    SnickersDaBunny

    Joined:
    Aug 12, 2014
    Posts:
    9
    I rely on this input manager for my game and have been successfully using it for some time. Unfortunately, after updating to the new Unity 5.1.3 today, it appears as though the StandaloneInputModule.cs script is filled with errors, rendering it unplayable. Please let me know if you can help out or if you have a fix, I can post the specific errors if necessary. As a warning to anyone else however: DO NOT update to 5.1.3 if you are using this. Thanks for any feedback you can provide!
     
  19. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    If you are using Unity 5.1.3 the quick fix for the errors is to open the StandaloneInputModule.cs script and replace line 274 with var mouseData = GetMousePointerEventData(0);

    I will update the plugin in the next couple of days, until then use the quick fix.
     
  20. SnickersDaBunny

    SnickersDaBunny

    Joined:
    Aug 12, 2014
    Posts:
    9
    Thanks for the quick fix, worked like a charm! After seeing so many errors show up, I first assumed many more things had been broken.
    Cheers!
     
  21. reiniat

    reiniat

    Joined:
    Apr 3, 2014
    Posts:
    6
    How would you use this for a local multiplayer game? Because the way the InputConfiguration is managed you cant use a controller and M&K at the same time, or multiple controllers.

    Should i just add all the m&k and controller axes inside one configuration?

    Edit, doing that is working fine actually.
     
  22. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    Yeah, add everything in one configuration. There is no way to run multiple configurations at the same time at the moment.
     
  23. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    I updated the plugin with better support for multiple players. You can now run up to four input configurations at the same time. Use InputManager.SetInputConfiguration to set the input configuration for each player then get the input by doing something like InputManager.GetAxis("Horizontal", PlayerID.One) or InputManager.GetButtonDown("Jump", PlayerID.Two). There is a new example(example 5) that demonstrates how it works.

    You can get the newest changes from Github.
     
  24. a436t4ataf

    a436t4ataf

    Joined:
    May 19, 2013
    Posts:
    1,873
    This is a nice idea, but the packaging is horrible, and I think this probably puts a lot of people off. After trying to make it work, I calculated it would have taken me less time to write a simple version myself (right now, I only need PC-centric remappable controls, so all the code for consoles etc I don't need to write).

    I would much prefer to use a shared, open-source, richer solution like this one. But I'm pretty much giving up now.

    If there was much better documentation, I would have a go at fixing these myself, but even trying to understand the codebase was a nightmare, and I had no idea what to change and what to leave. Instead, I'm going to shell out the cash for an asset-store version - I can't afford to waste hours more on writing this myself.

    (but I would like to see this succeed; I think it's sad that there's no basic, free, working input with core Unity!)

    FYI things I would change going forwards:

    1. What's all this exporting for? It creates extra ways for people to screw up, and Unity doesn't support package-export anyway, it's a half-implemented feature in core unity.
    2. Your "source" folder is NOT source: it's part of the actual runtime code. If it's not source, don't call it "Source". Source to most people means "don't export, it's not needed"
    3. You tell people to export Examples. Why? They should never be in your game project
    4. It looks like it should be a DLL. Why not make it a DLL? Then install becomes "drag, drop, done"
    5. I have *no idea* what is going on with "creat input manager" AND "open input editor" - you create two things to achieve one thing? One has a GUI when the other doesn't? Makes no sense to me. Unity plugins should have ONE object that is self-editing.
    6. Your instructions are wrong, they say that "open input editor" will ask to save. It does not. There is no further explanation on what happens next. Do I need to save manually? What do I save? Where do I save it? Which menu do I press? Why are there so many menus?
    7. Why are there so many menus? 20 or more menu options that all sound the same, with no info on which are required to make it work, and which are irrelevant for normal usage
    8. What's a snapshot? Do I need one? Don't I need one? No info on this
    9. I think most of the menus are not really menu things, they're simply things you've placed in the menu for convenience when debugging the InputManager project? They are VERY confusing, would be much better to get rid of them
    10. Your Getting Started gives zero info on what code to write to use the InputManager, so it doesn't achieve the one main thing it needs to achieve.

    Also ... InputManager is an unfortunate choice of name: it is unclear whose it is, and it is very likely to collide with future Unity names (not your fault that Unity has bad, generic naming, but best to avoid it). C# isn't great at having multiple classes of same name used in same source file - namespaces make it "safe" but the typing is a nightmare.
     
    _Exerion likes this.
  25. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    Thank you for your feedback. I'll look into streamlining the plugin.

    1. The plugin comes as a Unity project. In order to get it into your project you need to export it as a package(this is required in order to preserve some of the metadata). Just right-click on the "InputManager" folder and select "Export Package...". The "Addons" and "Examples" folders are optional and you can uncheck them in the export window.

    2. The folder is called "Source" because it contains the source code for the plugin. I wasn't aware that the word "Source" implies "don't export, it's not needed".

    3. The examples are optional, you don't have to export them.

    4. So you can edit the code if there's a bug or you need new features.

    5. "Create Input Manager" creates a new game-object in the scene and adds an InputManager component to it. "Open Input Editor" opens the input editor window where you can create the input axes. I made a separate editor because the inspector would have been to cluttered if I added every option there. You still have access to the input axes in the inspector for simple tweaks.

    6. In order to use the plugin I need to override your project settings. The first time you open the input editor you will be asked if you want to do it. If you choose not to do it when prompted you can do it at a later time from the input editor's "File" menu.

    8. Snapshots are an editor feature. If you make changes to the input axes during play-mode you can create a snapshot which will save your changes so you can then restore them when you exit play-mode.

    10. The "InputManager" class is a MonoBehaviour singleton. Create an instance in the scene then use the "InputManager" class as you would the built-in "Input" class. It has the same fields and methods as the "Input" class plus the ones listed in the readme file.
     
  26. Cookie966

    Cookie966

    Joined:
    Jun 24, 2015
    Posts:
    7
    I really love your InputManager, and I think it is really well done.
    I am curious about a couple of aspects (and I am too lazy to dig through the source code).

    1. How does your code handle the platform differences when the dpad on Windows uses axes while the dpad on OSX uses buttons as shown here: http://wiki.unity3d.com/index.php?title=Xbox360Controller. I noticed that all platforms use axis in the InputManager.
    2. The Windows triggers are shared on the 3rd axis, so if you hold down both triggers, there isn't a way to tell whether or not any of them are held down since the axis returns 0. Have you found a way to counteract that? I am curious because I saw that there are two axes for Left and Right triggers. Does that mean that one will not affect the other?

    Thanks!
     
  27. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    1. You'll need to create to input configurations(one for Windows and one for OSX) and choose the correct one at runtime based on the platform. Use Application.platform to check if you're running on Windows or OSX.

    2. There is no fix for this at the moment. I'll look into it.
     
    Cookie966 likes this.
  28. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    @Cookie966 I looked into the triggers issue and you are wrong, the triggers don't share the 3rd axis. The left trigger is on the 9th axis and the right trigger is on the 10th axis.
     
  29. Cookie966

    Cookie966

    Joined:
    Jun 24, 2015
    Posts:
    7
    Sorry. As you can see from the link I had, it used to be that way. I guess someone finally fixed it :p

    Where did you find the updated information? That link above is still one that comes up whenever I google controller inputs.
     
  30. nerdares

    nerdares

    Joined:
    Aug 4, 2015
    Posts:
    18
    Hey, I downloaded this and it seems to be working great except for the joystick axis. In input editor, a made a new element and renamed it to "LeftAnalogHorizontal", gravity = 0 , dead zone = 0.19, sensitivity at 0 and changed it to analog axis. Unfortunately its giving me this error: "ArgumentException: Input Axis joy_0_axis_0 is not setup."ArgumentException: Input Axis joy_0_axis_0 is not setup." when I run this code









    void Update ()
    {
    if (TeamUtility.IO.InputManager.GetAxis("LeftAnalogHorizontal") == 1)
    {
    print("Works");
    }
    }
     
  31. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    @Cookie966 I used the Joystick Mapping addon to get the key codes and axes for the XBox controller.

    @nerdares Open the Input Editor, go to the File menu and select Overwrite Input Settings.
    The sensitivity should not be zero. If it's zero you get no input.
    Also GetAxis returns a float so use Mathf.Approximately. == is not recommended for float values.
     
  32. Exploder1010

    Exploder1010

    Joined:
    Jul 19, 2014
    Posts:
    6
    Hey. Are you using the example code? Have you ever wanted to bind an analog button to the Xbox 360 d-pad, but you couldn't, because it was all axis-ey and gross? Well now you can. With this code:

    replace line 246 in RebindInput.cs:

    m_keyDescription.text = m_axisNames[m_axisConfig.axis];

    with this:

    m_axisConfig.invert = false;
    StartCoroutine(CheckEndOfAxis());

    and then put this somewhere in the same script:

    private IEnumerator CheckEndOfAxis()
    {
    yield return null;

    if (!InputManager.GetButton(m_axisConfig.name))
    {
    m_axisConfig.invert = true;
    m_keyDescription.text = "-" + m_axisNames[m_axisConfig.axis];
    }
    else
    {
    m_axisConfig.invert = false;
    m_keyDescription.text = "+" + m_axisNames[m_axisConfig.axis];
    }
    }

    Also obviously you have to check "Allow Analog Button" but also "Change Positive Key"

    edit: if you are making configs for multiple players you need to change the line:

    if (!InputManager.GetButton(m_axisConfig.name))

    to:

    if (!InputManager.GetButton(m_axisConfig.name, playerID))

    and add a:

    public PlayerID playerID;

    somewhere that you set based on which player you are rebinding for.
     
    Last edited: Dec 27, 2015
  33. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    @Exploder1010 Thanks for the tip. I updated the plugin to include this. The ScanResult struct now has a field named joystickAxisValue. You can use this value to check if the analog button should be pressed in the positive or negative direction and invert the axis accordingly.
     
  34. Exploder1010

    Exploder1010

    Joined:
    Jul 19, 2014
    Posts:
    6
    No problem daemon, thanks for working so hard on this lifesaving and totally necessary plugin! You are the unsung hero of unity developers. We absolutely need the level of professionalism that this plugin brings.
     
  35. Cookie966

    Cookie966

    Joined:
    Jun 24, 2015
    Posts:
    7
    I just ran into a strange problem. I put in an adapter so that people using other OSs on my project could work on stuff, but the input constantly changes from keyboard to gamepad and back which throws an error that says a player is already using the keyboard configuration. Do you know why it is switching constantly? I didn't change any of the default adapter settings.
     
  36. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    @Cookie966 Do you have multiple players in your game(like a local co-op game)? The adapter addon works with only one player.
     
  37. Cookie966

    Cookie966

    Joined:
    Jun 24, 2015
    Posts:
    7
    Oh alright. Yeah its local co-op
     
  38. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Does it import current bindings from Unity's InputManager automatically? I want to eventually migrate to this solution, but for now I am defining stuff in default manager (several custom defines already). So importing over to this custom one would be great.

    Additional thing is how good does it work with gamepads/joysticks and which desktop platforms does it support (ideally it should support all major three, starting from Linux, through OSX, finishing at Windows).

    Also, is it free for commercial use? It's kinda important for me.
     
  39. EliasMasche

    EliasMasche

    Joined:
    Jul 11, 2014
    Posts:
    92
    There a possibility to assign the PlayerID to difference between Player1 & Player2 in the Input Event Manager for Local Coop because right now my 2 players are using the same Axes from the Input Manager
     
  40. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    @EMGPY There is now. Get the latest changes from Github.

    @darkhog Sorry for not replying to your post. I didn't get any notification for it. You're probably not interested anymore but here are the answers anyway:

    No, it doesn't import Unity's InputManager bindings. You don't have access to it from scripts. That's why this plugin exists. You could write an editor tool that uses an YAML deserializer to extract the data from the InputManager asset(ProjectSettings/InputManager.asset) and convert it to an XML file that can be imported by the plugin.

    This plugin uses Unity's InputManager behind the scenes so it supports the same gamepads/joysticks. In addition it allows you to rebind gamepad buttons at runtime and you can have analog buttons(e.g. read the trigger on an XBox controller as a button instead of an axis).

    The code is released under the MIT license which means you can pretty much do whatever you want with it.
     
  41. EliasMasche

    EliasMasche

    Joined:
    Jul 11, 2014
    Posts:
    92
    @daemon3000 Really thx a lot for the new option in Input Event Manager is going to help a lot in my new project, In fav and Star your repo, beside going to tell to my friends about your repo. :)
     
  42. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    @daemon3000
    I'm actually kinda interested using it (still). However I'd need someone to write said editor script that would convert IM's bindings to plugin's as I have no experience writing such scripts. Plus it would be useful feature for anyone who would want to convert from internal manager to this one. Nice to know it's free for commercial use, probably will use it when my project nears completion if "converter" would be written by then/I'd have someone who's actually able to do it.
     
  43. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    @darkhog Here's simple converter I did: https://goo.gl/jKx0Ah
    1. Dowload the unitypackage and import it in your project.
    2. Go to the "Team Utility/Input Manager" menu and select "Import Unity Input Settings".
    3. Navigate to "YourProjectFolder/ProjectSettings" and select "InputManager.asset". You should keep a backup in case something goes wrong.
    4. Select a path where to save the imported data.
    5. Download and import the InputManager plugin.
    6. Create a new InputManager instance in your game, open the input editor, select "Import" from the "File" menu and navigate to the file you saved at step 4. For more info check the Getting Started page on Github.
    There are some issues with the converter. In Unity's input manager, when the type is set to "Key or Mouse Button", an axis can act as both a button and an axis; in this plugin it's separated. The converter checks if both the (alt)positive and (alt)negative keys are set and if they are the axis will be imported as a "Digital Axis" else it will be imported as a "Button".
     
  44. darkhog

    darkhog

    Joined:
    Dec 4, 2012
    Posts:
    2,218
    Thank you, @daemon3000. Downloaded it, but I'll use it when I'll finish most of the game to avoid accidental regressions later on if I decide I need another button but put it accidentally in Unity's manager instead of yours.

    Glad someone made such thing that is free for commercial use as I simply can't afford Rewire and whatnot.
     
  45. Bonecrusher52

    Bonecrusher52

    Joined:
    Dec 4, 2011
    Posts:
    18
    I tried copying this code for key remapping from the github wiki into one of my existing scripts -

    AxisConfiguration axisConfig = InputManager.GetAxisConfiguration("MoveVertical");
    axisConfig.positive = KeyCode.W;
    axisConfig.negative = KeyCode.S;
    axisConfig.sensitivity = 2.0f;
    axisConfig.invert = true;

    And got this error on the first line - No overload for method 'GetAxisConfiguration' takes '1' arguments. Is the documentation on github outdated? And if so where should I look for up to date information? Although getting this function to work is probably all I'll really need for my project.
     
  46. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    The documentation is outdated. To make it work use the following:

    Code (CSharp):
    1. //    Method I
    2. //    The first parameter is the ID of the player(you can process input for up to 4 players at the same time for local co-op).
    3. //    You can also use PlayerID.Two, PlayerID.Three or PlayerID.Four for the first parameter.
    4. //    The second parameter is the name of the axis.
    5. AxisConfiguration axisConfig = InputManager.GetAxisConfiguration(PlayerID.One, "MoveVertical");
    6.  
    7. //    Method II
    8. //    The first parameter is the name of an input configuration you create in the input editor.
    9. //    The second parameter is the name of the axis.
    10. AxisConfiguration axisConfig = InputManager.GetAxisConfiguration("KeyboardAndMouse", "MoveVertical");
     
  47. Bonecrusher52

    Bonecrusher52

    Joined:
    Dec 4, 2011
    Posts:
    18
    Thanks for your quick response, it works perfectly now. This plugin is exactly what I needed, didn't think I could support rebinding gamepads until I found it.
     
  48. ok_remi_ok

    ok_remi_ok

    Joined:
    Sep 16, 2014
    Posts:
    9
    This is such a great asset. Unity really lacks a proper input manager. Thank you for making this!
    However I'm having some issues trying to rebind inputs for 2 controllers.
    The first works fine but when I try to rebind any axis for the second joystick with the rebind script from the examples, this error shows up:

    Code (CSharp):
    1. IndexOutOfRangeException: Array index is out of range.
    2. TeamUtility.IO.Examples.RebindInput.HandleJoystickAxisScan (ScanResult result) (at Assets/Plugins/InputManager/Examples/01 - Controls Menu/Scripts/RebindInput.cs:295)
    3. TeamUtility.IO.InputManager.ScanJoystickAxis () (at Assets/Plugins/InputManager/Source/Runtime/InputManager.cs:363)
    4. TeamUtility.IO.InputManager.ScanInput () (at Assets/Plugins/InputManager/Source/Runtime/InputManager.cs:267)
    5. TeamUtility.IO.InputManager.Update () (at Assets/Plugins/InputManager/Source/Runtime/InputManager.cs:226)
    I tried to print m_axisConfig.axis and oddly, instead of saying 1 or 2 for the axis, it prints 11 or 12. Do you have an idea of why this could be happening?
     
  49. daemon3000

    daemon3000

    Joined:
    Aug 13, 2012
    Posts:
    139
    It's a bug in the plugin. I made some changes to the input scan code but I didn't have multiple controllers to test it properly.
    The quick fix is to open the InputManager.cs file and replace line 359 with:
    Code (CSharp):
    1. _scanResult.joystickAxis = i % AxisConfiguration.MaxJoystickAxes;
    Let me know if it works or not.
     
  50. ok_remi_ok

    ok_remi_ok

    Joined:
    Sep 16, 2014
    Posts:
    9
    It worked! Wow, thank you for the quick response.
    Now I still have issues the game not recognizing inputs but it might be a gamepad issue so...