Search Unity

Rewired - Advanced Input for Unity

Discussion in 'Assets and Asset Store' started by guavaman, Sep 25, 2014.

  1. Joshdbb

    Joshdbb

    Joined:
    Oct 28, 2014
    Posts:
    50
    I just tried testing our game on steam remote play. When my friend connected to my game it caused errors to be continuously logged every frame:


    [C:\buildslave\unity\build\PlatformDependent/Win/Input/RawInput.cpp line 1258]

    <RI> Failed to get input data: The handle is invalid. UnityEngine.StackTraceUtility:ExtractStackTrace () uVtMEwvkZuUvKbFnUdnlHHcEaZe:gvpvpPjQDQkBbWoqFjDqYHRICWn (intptr,uint,intptr,intptr) kbiQHTEyKOXtvdqHkwBICfNcJET:gvpvpPjQDQkBbWoqFjDqYHRICWn (intptr,uint,intptr,intptr) LXEezRiCvKNWggUDcfjKInOiJcBe:WDcCWKvFZvwyBtRpiePoyfWiUuc (intptr,uint,intptr,intptr)



    I was running the game on Windows, my friend was on OSX (using a ps4 controller).

    I saw someone else mention a similar error in this forum and you said that it was probably to do with the new unity input system. I have checked and I am using the old input system.

    The game seemed to run fine and both of our controllers seemed to be working as expected.

    Any ideas how I can stop this error?
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    This error is not being caused by Rewired. All Rewired logs are prefixed with the word "[Rewired]". This log entry is being made by Unity, not Rewired.

    The only reason Rewired is anywhere in the stack trace is because Rewired reroutes mouse events to Unity. Raw Input allows one single window to receive Raw Input events for a device in an application. Rewired takes over mouse events and receives them to its message window. In order to make Unity mouse input work again, it has to forward the message to Unity's window so it can receive them and process them. Rewired is not involved here in any way except as a middleman.

    I've had this reported to me several times recently, so I'm guessing it's either due to a change by Unity or Steam.
     
  3. Toficor

    Toficor

    Joined:
    May 6, 2015
    Posts:
    33
    Hello, I have problem with ControlMapper included in Rewired.

    Unity version -> 2019.1.8f1
    Rewired version -> 1.1.32.0.U2019

    So it's very simply when I swap binding on actions in example: switch arrows for turning left and right. None of this binding works, despite I see it on Button Maps list in debug information.

    Code of ControlMapper wasn't changed.

    Am I missing something ?
     
  4. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
  5. Elledan3101

    Elledan3101

    Joined:
    May 24, 2013
    Posts:
    18
    Hello! How can I get access to the RuleSet.ID?
    Here my code listing:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using Rewired;
    5.  
    6. public class InputMapTester : MonoBehaviour
    7. {
    8.     [SerializeField]
    9.     private string playerID = "Player0";
    10.  
    11.     [SerializeField]
    12.     [ActionIdProperty(typeof(RewiredConsts.Action.Default))]
    13.     private int testActionID;
    14.  
    15.     private Player activePlayer;
    16.  
    17.     private void Start()
    18.     {
    19.         activePlayer = ReInput.players.GetPlayer(playerID);
    20.     }
    21.  
    22.     private void Update()
    23.     {
    24.         if (activePlayer.GetButtonDown(testActionID))
    25.         {
    26.             Debug.Log($"Detected action with ID: {testActionID}");
    27.         }
    28.  
    29.         if(Input.GetKey(KeyCode.Alpha0))
    30.         {
    31.             SwitchRuleSetWithTag();
    32.         }
    33.  
    34.         if (Input.GetKey(KeyCode.Alpha0))
    35.         {
    36.             SwitchRuleSetWithID();
    37.         }
    38.  
    39.     }
    40.  
    41.     [SerializeField]
    42.     private string mapRuleSetTag = "DisableAll";
    43.  
    44.     private void SwitchRuleSetWithTag()
    45.     {
    46.         var mapEnabler = activePlayer.controllers.maps.mapEnabler;
    47.  
    48.         for (int i = 0; i < mapEnabler.ruleSets.Count; i++)
    49.         {
    50.             var currentRuleSet = mapEnabler.ruleSets[i];
    51.             currentRuleSet.enabled = currentRuleSet.tag == mapRuleSetTag;
    52.         }
    53.         mapEnabler.Apply();
    54.     }
    55.  
    56.     [SerializeField]
    57.     [ActionIdProperty(typeof(RewiredConsts.MapEnablerRuleSet))]
    58.     private int testRuleSetID;
    59.  
    60.     private void SwitchRuleSetWithID()
    61.     {
    62.         var mapEnabler = activePlayer.controllers.maps.mapEnabler;
    63.  
    64.         for (int i = 0; i < mapEnabler.ruleSets.Count; i++)
    65.         {
    66.             var currentRuleSet = mapEnabler.ruleSets[i];
    67.             currentRuleSet.enabled = currentRuleSet.ID == testRuleSetID; // ID not found
    68.         }
    69.         mapEnabler.Apply();
    70.     }
    71. }
    72.  
    So I see, I can export all my IDs to the RewiredConsts.
    I can serialize MapEnablerRuleSet via Unity's Inspector, but I don't understand how can I use IDs like in SwitchRuleSetWithID method?
     
  6. Elledan3101

    Elledan3101

    Joined:
    May 24, 2013
    Posts:
    18
    By the way. I can see RuleSet IDs in Rewired editor.
    So what am I doing wrong?

    upload_2021-6-10_15-34-17.png
     
  7. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hi.
    I'm a bit confused about joystick axis sensitivity. In the documentation about Input Behavior it is stated that Digital Axis Gravity and Digital Axis Sensitivity is a speed towards value, which corresponds to the common concept of axis sensitivity. But Joystick Axis Sensitivity is a multiplier. What was the logic behind naming this property a sensitivity? Shouldn't it be called Multiplier?

    I've searched this thread for possible questions about joystick axis sensitivity and found a few. Your suggestion is to use Sensitivity Curve property of Axis. But isn't it a different concept from digital axis sensitivity? If so you can't apply uniform approach for both digitial and joystick axes in your controller script.

    So here I'm, a bit lost. I need to be able to manipulate values from joystick axis the same way digital sensitivity/gravity does. If i'm to do so on my own, I should get into consideration deadzone, curve, zero and ranges. And all these things already being calculated somewhere internal, meaning it wouldn't be efficient at all.

    Here is a link to a thread on official Warthunder game forum, explaining controller settings. Sensitivity setting is exactly the thing I'm speaking of. And this is a link to Assetto Corsa forum, where setting Steering Speed correspond to Joystick Sensitivity.

    Have you considered adding this functionality in some near future? If not, do you have any suggestions on how to implement it?

    Didn't want to sound rude or anything. This is an amazing asset, which allowed me to use custom controllers in no time at all. Kudos
     
  8. Toficor

    Toficor

    Joined:
    May 6, 2015
    Posts:
    33
  9. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    You can't. See this post for the explanation:
    https://forum.unity.com/threads/rewired-advanced-input-for-unity.270693/page-146#post-7160350
     
  10. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    The logic is, the lower the sensitivity, the smaller the axis value that is returned and vice versa. (Imagine a thumb or other joystick.) This translates to a more or less sensitive joystick to the end user. It also leaves open the possibility of other sensitivity calculation options in the future, such as power.

    Digital Axis Sensitivity is totally different and is a change in value of the axis over time, making a digital button behave somewhat like an axis based on how long the user holds that button down. There is no equivalent for axes. Doing so would introduce lag into the axis value from the perspective of the user.

    Axis calibration sensitivity applies to a joystick axis at the Controller level before any Actions are calculated from that value. Digital Axis Sensitivity is an Action-level post-processing. It never applies to axes anyway, so it's impossible to use the two together.

    If you want to introduce a lag into your axis Action value, you'll have to process that in a script. Rewired doesn't offer that feature.

    Every option you see in the Input Behavior applies to the Action value, not the underlying Controller element value. That's why every Action must be designated a single Input Behavior. An Input Behavior is basically a filter on the final Action value. Controller axis dead zones, min, max, inversion, etc., have already been applied to the Controller element before the Action is calculated and filtered by the Input Behavior.

    The description of those controls in that link

    I don't have any plans on adding this, and especially not near-term. I have a ton of things on my plate, including many new platforms that have to be supported. I've never had anyone ask for this feature before now.

    "Steering Filter: How quickly stick input affects the turning of the steering wheel. At 100% the wheel cannot be turned at all.", would be easy enough to implement by applying a simple filter to the Action output when you store your final game wheel axis value. Something like:

    Code (csharp):
    1. float speedMultiplier = 0.1f;
    2. float value = player.GetAxis("Wheel");
    3. wheelAxis = Mathf.Clamp(wheelAxis + value * Time.deltaTime * speedMultiplier, -Mathf.Abs(value), Mathf.Abs(value));
    wheelAxis does not represent a input Action value coming from and managed by the input system, but an in-game value that is fully managed by your script, and therefore you can process, clear, or do whatever you want to it outside of the input system. Your gameplay logic would consume this value instead of the Rewired Action directly.

    Some of the sensitivity options shown in the Assetto Corsa link are gameplay-related sensitivities, not strictly input-related, and therefore shouldn't be handled by the input system. For example: "Speed Sensitivity: at 100% the car reacts to steering input the same at higher speeds as it does at lower. Lowering the percentage dampens steering input at higher speeds." That option is dependent upon the speed the car is currently traveling which is a gameplay concern. Such a sensitivity option should be handled in the game code instead of the input system.

    It's important to recognize the boundary between input and gameplay logic as noted on the Actions page of the documentation:

    Rewired’s Purpose and Responsibilities

    It is common for Rewired's Action system to be used in an unintended manner as an integral part of or in place of a separate game state management system. This is not what Rewired was designed for and not how it is intended to be used.
    • Rewired’s sole purpose is to read user input.
    • All “Actions” in Rewired are actually “Input Actions” and should not be used for any other purpose than to get information about the user’s intent. They should not be confused with or used as game states or actions.
    • The Action “Jump” does not designate “Player is jumping,” but rather “The user wants to jump.”
    • The game should implement permission and state management systems that evaluate user input and then change states. After that point, what happens is outside the responsibility of the input system.
     
    Last edited: Jun 10, 2021
  11. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    I will need to see a complete example of this to be able to understand what is happening. My testing using the Rewired/Extras/ControlMapper/Examples/ControlMapperDemo scene shows the Swap functionality working exactly as expected. The bindings produce the correct Action values when swapped.

    If the Action Element Map bindings are showing up in Debug Information, they exist and will affect the Action value. Once Control Mapper has created the bindings, it has nothing more to do with their function. Verify the bindings are correct in Debug Information and bind to the key you want them to, and show the correct axis range, axis contribution, and other properties that describe the binding and how it behaves. Also verify the Controller Map is enabled. Verify you have no other bindings that would negate the Action value you're trying to read, for example another binding to the Action on this or another Controller Map that is being activated by the same key that inverts the axis value. Debug Information can show you everything about the bindings and Actions you need to know to find where the problem lies.
     
  12. wechat_os_Qy06eaOhICF9NcZoMWMLtv5cI

    wechat_os_Qy06eaOhICF9NcZoMWMLtv5cI

    Joined:
    Feb 1, 2018
    Posts:
    33
    HI,I have done a very basic WASD locomotion.But why those code only work for positive double pressed...It's always return false for negative double pressed.!
    "
    bool doubleholdh = player.GetButtonDoublePressUp("HorizontalMotion");
    bool doubleholdv = player.GetButtonDoublePressUp("VerticalMotion");
    "
    Both action type is "Axis"....Please Help!
     
  13. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    https://guavaman.com/projects/rewired/docs/HowTos.html#button-press-types

    Negative Buttons:

    Each of the methods above also has a corresponding Negative Button method which is named the same except with NegativeButton in place of Button. These serve to allow you to use axes as buttons and will trigger when the negative side of the axis is activated while the standard Button version will trigger only when the positive side of the axis is activated. However, it is usually easier to just map each pole of the axis to a seperate Action (split axis) so that each Action can just be queried with GetButton.

    If you want all GetButton calls to return True when either the positive or negative side of the axis is activated, enable the option "Activate Action Buttons on Negative Values" in the Rewired Editor.
     
  14. wechat_os_Qy06eaOhICF9NcZoMWMLtv5cI

    wechat_os_Qy06eaOhICF9NcZoMWMLtv5cI

    Joined:
    Feb 1, 2018
    Posts:
    33
    It's worked!!!!Thanks!!!and one more thing....can we get the Axis input value just -1,0,1 without accelerate value...and can we get pure input buffer from Rewired plugin ...?
    Thanks ..dude..your Input Plugin is great!
     
  15. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    GetButton and GetNegativeButton give you binary values regardless of whether the source is an axis or a button/key.

    https://guavaman.com/projects/rewired/docs/HowTos.html#button-press-types
     
    Last edited: Jun 12, 2021
  16. n00b_013

    n00b_013

    Joined:
    Dec 20, 2020
    Posts:
    14
    This product looks very promising, though, I can't get it to work properly with my Vehicle Physics Pro... Maybe you can help me out a bit Guavaman :)

    This is the code I'm using on the car :

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4. using UnityEngine.InputSystem.DualShock;
    5. using Rewired;
    6. using Player = Rewired.Player;
    7.  
    8. public class Gamepad : MonoBehaviour
    9. {
    10.     [SerializeField] private int playerID = 0;
    11.     [SerializeField] private Player player;
    12.  
    13.     private float gamepadInput = 1.0f;
    14.  
    15.  
    16.     private void Start()
    17.     {
    18.         player = ReInput.players.GetPlayer(playerID);
    19.     }
    20.     void Update()
    21.     {
    22.         //        float horizontalInput = Input.GetAxis("Horizontal") * gamepadInput;
    23.         //        Debug.Log("Steering: " + horizontalInput);
    24.  
    25.         //        float verticalInput = Input.GetAxis("Vertical") * gamepadInput;
    26.         //        Debug.Log("Acceleration: " + verticalInput);
    27.  
    28.         float horizontalInput = player.GetAxis("Horizontal");
    29.         Debug.Log("Steering: " + horizontalInput);
    30.  
    31.         float verticalInput = player.GetAxis("Vertical");
    32.         Debug.Log("Acceleration: " + verticalInput);
    33.     }
    34. }
    My steering and trottle axis are set to Horizontal and Vertical accordingly in the car controller :
    upload_2021-6-13_12-1-38.png

    With the same naming in the rewired controller actions:
    upload_2021-6-13_12-2-54.png


    And the joystick mapping (PS4 in this care) also..
    upload_2021-6-13_12-3-26.png

    I was deeply struggling at first with the float -1 to 1 on the L2 and R2 trigger of my PS4 controller.. Though, I've seen the Rewired input fixes this like a charm.. In the console output for L2 = only negative and R2 only positive, as needed. Though, my car isn't moving at all after this..

    If I un-comment lines 22 to 26, the car is moving again.. But I want to make use of the rewired method.. What am I doing wrong?
     
  17. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    This code cannot possibly work. You're just getting the values and doing nothing with them. The local values horizontalInput and verticalInput go out of scope at the end of Update. Uncommenting lines 22 to 26 does nothing but go back to using UnityEngine.Input for input, but you're still doing nothing with the resulting values.

    Assuming this is not the complete code you're using and you've just removed the part that actually utilizes the input, the problem is probably in your input configuration in the Rewired Input Manager. It's likely incomplete. Did you follow the Quick Start and read the documentation on how to set up input?

    There are guides in the documentation that are designed to help debug this kind of problem:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#joystick-problems
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#controller-doesnt-work
    https://guavaman.com/projects/rewir...l#debug-information-diagnosing-input-problems

    I suggest you go through these and find what you've missed. (My first suspicion would be that you did not assign the controller maps on start to the Player in the Rewired Input Manager.)
     
    Last edited: Jun 13, 2021
  18. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    Hello, I'm getting warnings regarding Unity Input Manager but I'm using the new input system. Does this support the new system? Thanks
     
  19. bcv

    bcv

    Joined:
    Sep 1, 2012
    Posts:
    34
    My bad, I just went searching and found it does not support the new system. This is kind of bad as in XR you are forced to adopt the new system
     
  20. Toficor

    Toficor

    Joined:
    May 6, 2015
    Posts:
    33
    So before remaping my Actions and Maps looks like this.

    upload_2021-6-14_11-44-20.png

    upload_2021-6-14_11-49-1.png

    After Remapping:

    upload_2021-6-14_11-54-44.png

    upload_2021-6-14_11-55-40.png

    upload_2021-6-14_11-53-50.png


    I noticed that after remapping i recieve only button value not axis value when it comes to Stick Left X Value Game.


    Edit:
    This bug occurs only when I want to swap button with another. Even when i first remove mapping, when I'm trying to set map to button previously deleted I still get conflict popup.
     
    Last edited: Jun 14, 2021
  21. thiskidcalledtom

    thiskidcalledtom

    Joined:
    Nov 9, 2017
    Posts:
    35
    Hello. I've been using Rewired. I have an inventory system that uses the Ipointer interface, is it possible to use Rewired to interact with Ipointer interface? thank you
     
  22. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Well there's nothing I can do. It's impossible for an application to register for Raw Input events for a device to multiple Windows. Rewired cannot capture Unity's Raw Input events, and if Rewired takes them, Unity can't get them. Unity processes them on a different thread now so I cannot forward the events back to their Window because it will have a threading error when they access them. There are many other technical reasons this can't be done. The only possible way I could support their system is to totally rewrite support on all platforms dropping native input and making yet another Unity fallback code path, which also means going back and manually re-making thousands of controller mappings across all platforms with every controller Rewired supports using the new input system. It's a gigantic task that would take months of full time work, which I do not have.
     
    Last edited: Jun 14, 2021
  23. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    You are binding two buttons to an Axis-type Action, one on each pole. You've set up Left Arrow with an Axis Contribution of negative and Right Arrow with an Axis Contribution of positive. When you swap, Right Arrow now has a negative Axis Contribution and Left Arrow a positive.

    upload_2021-6-14_11-55-40.png

    I can see Button Value and Negative Button Value are both true at the same time and the amount of time each was pressed is also exactly equal. There can only be one explanation for this: As I said before, you probably have another binding that binds this key to this Action and that binding was not modified by this swapping, and that binding is bound with a negative Axis Contribution. The binding could be in this or some other Controller Map. The two together are canceling out the value, resulting in an Axis Value of 0. That's the only explanation I can think of. Look through all the Controller Maps in the Player, not just this Controller Map, for a binding that binds to Stick Left X.

    Further evidence that you have multiple bindings of these keys to this Action.
     
    Last edited: Jun 14, 2021
  24. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    If you are referring to the IPointerClickHandler, IPointerDownHandler, IPointerExitHandler, IPointerUpHandler interfaces, those are generated by the Standalone Input Module and sent through the Event System and that is part of Unity UI. Rewired has the equivalent Rewired Standalone Input Module to replicate its behavior while changing the source of input to Rewired.
     
    thiskidcalledtom likes this.
  25. little_box

    little_box

    Joined:
    Aug 22, 2017
    Posts:
    28
    Hi, guavaman. I upgrade rewired to 1.1.38.4.u2020.
    It appears a series of log like [PDEBUG] OsInputManager: Initialize. [PDEBUG] HIDManager: Constructor
    Can I disable it?
     
  26. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    That was an error which was fixed in 1.1.39.1 on OSX. The current version of Rewired is 1.1.39.2.
     
    Last edited: Jun 15, 2021
  27. Toficor

    Toficor

    Joined:
    May 6, 2015
    Posts:
    33

    Thank you so much, this information helped mi a lot.
     
  28. thiskidcalledtom

    thiskidcalledtom

    Joined:
    Nov 9, 2017
    Posts:
    35
    is it possible to detect what type of input device is being used? Im using generic map but there must be a way to detect the specific controller being used to play the game. Since i want to add UI sprites for Xbox and PS4. I don't want it to be platform dependant. Since this project is PC only. but would like to fully support multiple controller types.
     
  29. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    https://guavaman.com/projects/rewired/docs/HowTos.html#display-glyph-for-action
    https://guavaman.com/projects/rewired/docs/HowTos.html#last-used-controller
     
  30. thiskidcalledtom

    thiskidcalledtom

    Joined:
    Nov 9, 2017
    Posts:
    35
  31. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Read the first link I sent. It contains all the information you need to determine this and specifically outlines how to display controller-specific glyphs to the user, which is what you are trying to do.

    More information:
    https://guavaman.com/projects/rewired/docs/HowTos.html#identifying-recognized-controllers
     
  32. CurryKitten

    CurryKitten

    Joined:
    Dec 22, 2016
    Posts:
    36
    Loooong delay - sorry about that. I don't really understand what direction to go from your response though. I'm having to assume that if my little loop

    Code (CSharp):
    1. for (int i = 0; i < displayNumButtons; i++)
    2. {
    3.     buttonToggle[i].isOn = player.controllers.Joysticks[0].GetButton(i);
    4. }
    Shows that buttons are being pressed, then Unity/Android are representing that button press to Rewired. Is that fair?

    Taking a real world scenario, a user has a regular USB joypad, his twin sticks are detected as axis and these are reassigned actions - that works fine. The buttons on the controller show up as buttons (at least as far as that snippet of code above goes) but when he reassigns those buttons to actions, they aren't picked up by rewired when I use normal calls such as player.GetButtonDown("Flip")

    So what is the disconnet here, if rewired see we're pushing a button via GetButton and we assign that button an action, then why isn't it get set when we GetButtonDown based on that action? What is your advice for making the button actually react - I'm sure I can't be the only person using Android and unknown controllers, so I assume it's just me not doing something correctly!?
     
  33. monokelvivien

    monokelvivien

    Joined:
    Oct 10, 2019
    Posts:
    7
    Hi there!
    We are using your plugin and love it! But unfortunately, a couple of users have reported an issue and we're not sure what the issue is.
    We are using Unity 2019.4.21f1 and the plugin version 1.1.37.0
    I've setup the Gamepad Template as well as the Unknown Controller template.
    We are only using the A & X button on (xbox) controllers, and some people have reported that the X button wasn't working on their XBOX One controller and XBOX Series X controller. The XBox one controller was being played in wireless mode in case this makes a difference.
    Is there any known issue that could lead to that?
     
  34. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    If the button is returning when Controller.GetButton is called, it is exposed by Unity as a button and Rewired is treating it as a button.

    Which pole of the axis is the user assigning this button to? If to the negative, GetButtonDown will not work.

    ----

    https://guavaman.com/projects/rewired/docs/HowTos.html#button-press-types

    Negative Buttons:

    Each of the methods above also has a corresponding Negative Button method which is named the same except with NegativeButton in place of Button. These serve to allow you to use axes as buttons and will trigger when the negative side of the axis is activated while the standard Button version will trigger only when the positive side of the axis is activated. However, it is usually easier to just map each pole of the axis to a seperate Action (split axis) so that each Action can just be queried with GetButton.

    If you want all GetButton calls to return True when either the positive or negative side of the axis is activated, enable the option "Activate Action Buttons on Negative Values" in the Rewired Editor.

    ----

    That is the only thing that comes to mind at the moment. If I think of anything else, I will reply again.
     
  35. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    • What platform?
    • What input sources are being used (Rewired -> Settings -> Platform -> Primary Input Source and "Use XInput)?
    • Is Steam involved here?
     
    monokelvivien likes this.
  36. CurryKitten

    CurryKitten

    Joined:
    Dec 22, 2016
    Posts:
    36
    Thanks for this - I'd never considered a negative axis in terms of a button. I tried the Active Action Buttons on Negative Values for Android, but this didn't make a difference. I checked how the button is set via the editor (albeit on the desktop where things work perfectly) and as far as I can see things look ok ?

    Screenshot 2021-06-19 at 13.23.18.jpg
     
  37. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    They are fine. These are Button-type Actions so the Axis contribution is always positive. The only time you would need it to be negative is if they're binding to an Axis-type Action and you're trying to get the value from the negative side of the axis.

    There is no difference whatsoever between how Action values are calculated on PC or Android. So there is something else entirely going on here that we are unaware of.

    I suggest you use Debug Information on Android and thoroughly debug it at runtime. Debug Information comes with a prefab that can be included in builds. Items can be opened by using the touch screen. Items are small and hard to touch, but it can be done.

    Go through this checklist. It tells you everything that makes up an Action value:
    https://guavaman.com/projects/rewir...l#debug-information-diagnosing-input-problems

    First check the lowest level -- the Controller Button element. Does the value change when you press the button?

    Go through the list.

    My guess is that it's only failing at the Action level. If that's the case, then I'm going to guess it's one of:
    1. Input Behavior settings.
    2. The binding settings that were created (binding it to the wrong Axis contribution).
    3. In the case of trying to bind to the negative pole of an Axis-type Action, you have another equivalent binding of that button already that has a Positive Axis Contribution to that same Action and the two are cancelling each other out.
     
  38. CurryKitten

    CurryKitten

    Joined:
    Dec 22, 2016
    Posts:
    36
    Thanks for that note about the debug prefab, I hadn't spotted that. Wowsers, you need keen eyes and fingers like needles to use it though. Any change of doing something in the future so it could be positioned and sized.

    However, I was able to see some key information

    Screenshot_20210620_150852_com.CurryKitten.CKFPVSimMobile.jpg

    When I look at the button assignment I can see that the ElementIdentifier name that we are assigning this button to Axis 20 instead of Button 0 as I'd have expected. The logic behind how I assign individual action (in the case of defining an action for a new button) is to run something like -

    Code (CSharp):
    1. controllerMap.CreateElementMap(newAction, 0, (buttonToChange + myNumAxis), ControllerElementType.Button, AxisRange.Full, false)
    Whilst you can probably figure out most of the variable intent. When working out which element id to use, I noticed the ids were assigned in sequential order from axis to buttons, so in the case of a 32 axis controller, it means that button 0 would have an element id of 32. Hence when working out the element id of the button to change it's a simple case of adding the number of axis to the button I'm changing.

    I guess this is where Android throws in a curve ball. Whilst the unknown controller has 32 axis, you mentioned that Android only exposes 20 of them. But if I look at the axis element identifiers for the joystick, there are still 32 of them, so button 0 is still 32, and not 20.

    This explains why "known" joysticks like xbox or ps4 controllers are correct - the axis/button count is properly known. I haven't looked at the way I want to work around this yet. I have a feeling I'm using the method of counting to work out an element is because I was finding it difficult to find a way of getting an element id back based on a raw button/axis - I can't remember. I there an easy way? Failing that the quick way may be to work out which controller map we are using in order to correct the count... I don't know if this is simple either?
     
  39. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    This isn't safe, even for known controllers. There's no guarantee element identifier ids will go in any particular order. There are a number of controller definitions I recall where a new button or axis was added at a later date, throwing the id ordering out.

    If your intention is to list buttons, then axes (or vice versa), you can get the element identifier ids from the elements in the Controller.

    Code (csharp):
    1. for(int i = 0; i < controller.buttonCount; i++) {
    2.     // Two ways to get the eid
    3.     Debug.Log(controller.Buttons[i].elementIdentifier.id);
    4.     Debug.Log(controller.ButtonElementIdentifiers[i].id);
    5. }
    https://guavaman.com/projects/rewir...wired_Controller_ButtonElementIdentifiers.htm

    The Unknown Controller is a single definition for all platforms. Element identifier ids are fixed and used across all platforms. The definition supports 32 axes, 128 buttons, and 16 hats, but most platforms will never (and cannot) use all those elements.
     
  40. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    I remember those type of controllers. One firmware update changed everything.
     
  41. monokelvivien

    monokelvivien

    Joined:
    Oct 10, 2019
    Posts:
    7
    Thanks for the fast response. The platform is Windows Standalone, we build with IL2CPP.
    I've appended a screenshot of the settings.
    Aaannnd yes, Steam is involved. We just published a demo via Steam.
    Also, we can't reproduce this issue ourselves, and people that reported that issue apparently also don't have it 100% of the time. Hope this helps narrow down the issue.

    Edit:
    Users also reported that the X Button Action moved to the L Button
     

    Attached Files:

    Last edited: Jun 21, 2021
  42. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    The settings screen shot does not show me any useful information. You have the "All" page selected. You are building on Windows so the "Windows" page must be selected.

    It's a virtual certainty this is not an issue with Rewired, but is either one of these two things:
    1. The user has remapped their controls in Steam.
    2. The Controller Map is binding the Action to the wrong button. If the user has a way to rebind their controls, they probably did this themselves.

    Please read about Steam input:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#steam
     
  43. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    49
    We are facing issue of visibility of controller in live game.
    Many users have started reporting controls are not visible on their android devices.
    How to find out what is causing issue for certain android devices ?
    Rewired version used in game is 1.1.38.4
     
    Last edited: Jun 22, 2021
  44. Slaktus

    Slaktus

    Joined:
    Dec 5, 2012
    Posts:
    60
    Game hangs on Windows in both editor and build when starting game with a PlayStation 4 controller connected via USB.

    Rewired gives this warning:

    Code (CSharp):
    1. Rewired: Exception creating custom driver joystick. Will fall back to normal HID joystick.
    2. UnityEngine.Logger:LogWarning (string,object)
    3. Rewired.Logger:LogWarningNow (object,bool)
    4. Rewired.Logger:LogWarning (object,bool)
    5. Rewired.Logger:LogWarning (object)
    6. YkKIPPiCWZeAzAfNMTiDRgJXluDN:ODInkuxiJQaUAzORvJHYcVcMigY (dBNoePwdKYyWerGenDMKaakIaLZh,intptr,int,OzVqfYeaMNEXzwFiuZOmGiQFiUf,System.Collections.Generic.List`1<TPOFglCEUenQueqhakDnrjLmVbgq>,bool)
    7. YkKIPPiCWZeAzAfNMTiDRgJXluDN:bbUocgDoJKHCOdDcKYXySofQIqKS (dBNoePwdKYyWerGenDMKaakIaLZh,OzVqfYeaMNEXzwFiuZOmGiQFiUf,intptr,uint16,uint16,int)
    8. YkKIPPiCWZeAzAfNMTiDRgJXluDN:sxPAeIAFcHyEBkGATGrYiyDuyxe (intptr,mIFFTdrbNcbzbukmuqHJRmmAKeH,System.Collections.Generic.IList`1<xJrcpabxFNJEeLKxzDoQfzegzEjy/HgZMwhsohjWIBboQuvWWFfRgqgD>,System.Collections.Generic.List`1<string>,int)
    9. YkKIPPiCWZeAzAfNMTiDRgJXluDN:bVfvLqacePuaRPmfIxvTjQcwpeP (bool)
    10. YkKIPPiCWZeAzAfNMTiDRgJXluDN:.ctor (Rewired.Data.ConfigVars,bool,bool,UcjcCicwSOnbqeWIgHcOdekypFs,uXmfJyNysxkJVMfVjUMqRSBUjHs)
    11. KQMPeTwPTsLuGhkUNxqXEROjtXA:.ctor (Rewired.Data.ConfigVars,bool,System.Func`2<Rewired.BridgedControllerHWInfo, Rewired.HardwareJoystickMap_InputManager>,System.Func`1<int>,bool,bool,bool,bool)
    12. sYGArRodgBwPmjtbrSXkcLAheAe:GxxvpOGdkQAsxVaawpeZQpRKpGz (Rewired.Data.ConfigVars,pdummRpNhhHcNABVOjSMuAZyhxoE)
    13. sYGArRodgBwPmjtbrSXkcLAheAe:.ctor (Rewired.Data.ConfigVars,System.Func`2<Rewired.BridgedControllerHWInfo, Rewired.HardwareJoystickMap_InputManager>,System.Func`1<int>)
    14. Rewired.InputManagers.Initializer:Initialize (Rewired.Data.IConfigVars_Internal)
    15. leHaHiGKLRfwikIkRPeWBAYNSTq:SdmfoteCDVoXNaSlWEvRMBbwmDy (string,System.Collections.Generic.List`1<System.Reflection.Assembly>,Rewired.Data.ConfigVars)
    16. Rewired.InputManager_Base:InitializePlatform (Rewired.Data.ConfigVars)
    17. Rewired.ReInput:nzKJVBylRGKzOZPVGCOtRTDFpUL (System.Func`2<Rewired.Data.ConfigVars, object>)
    18. Rewired.ReInput:SdmfoteCDVoXNaSlWEvRMBbwmDy (Rewired.InputManager_Base,System.Func`2<Rewired.Data.ConfigVars, object>,Rewired.Data.ConfigVars,Rewired.Data.ControllerDataFiles,Rewired.Data.UserData)
    19. Rewired.InputManager_Base:Initialize ()
    20. Rewired.InputManager_Base:Awake ()
    21. UnityEngine.Object:Instantiate<UnityEngine.GameObject> (UnityEngine.GameObject,UnityEngine.Transform)
    22. Myriad.Entry/<>c:<Bootstrap>b__0_0 () (at Assets/Scripts/Entry.cs:27)
    23. Myriad.Assets/<LoadAssetBundles>d__15:MoveNext () (at Assets/Scripts/Assets.cs:180)
    24. UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    25. Myriad.Assets:Initialize (UnityEngine.MonoBehaviour,System.Action) (at Assets/Scripts/Assets.cs:15)
    26. Myriad.Entry:Bootstrap () (at Assets/Scripts/Entry.cs:9)
    27.  
    and this error:

    Code (CSharp):
    1. Rewired: Failed to open HID device for reading. This device (Controller (XBOX 360 For Windows)) may not function.
    2. ------- Rewired System Info -------
    3. Unity version: 2019.4.28f1
    4. Rewired version: 1.1.39.2.U2019
    5. Platform: Windows
    6. Editor Platform: Windows
    7. Using Unity input: False
    8. Primary input source: RawInput
    9. Use XInput: True
    10. Native mouse handling: True
    11. Enhanced device support: True
    12.  
    13. UnityEngine.Logger:LogError (string,object)
    14. Rewired.Logger:LogErrorNow (object,bool)
    15. Rewired.Logger:LogError (object,bool)
    16. Rewired.Logger:LogError (object)
    17. vbkjNjHATCWdCHIMnyXZzpSXcCp:.ctor (int,dBNoePwdKYyWerGenDMKaakIaLZh,intptr,OzVqfYeaMNEXzwFiuZOmGiQFiUf)
    18. YkKIPPiCWZeAzAfNMTiDRgJXluDN:ODInkuxiJQaUAzORvJHYcVcMigY (dBNoePwdKYyWerGenDMKaakIaLZh,intptr,int,OzVqfYeaMNEXzwFiuZOmGiQFiUf,System.Collections.Generic.List`1<TPOFglCEUenQueqhakDnrjLmVbgq>,bool)
    19. YkKIPPiCWZeAzAfNMTiDRgJXluDN:bbUocgDoJKHCOdDcKYXySofQIqKS (dBNoePwdKYyWerGenDMKaakIaLZh,OzVqfYeaMNEXzwFiuZOmGiQFiUf,intptr,uint16,uint16,int)
    20. YkKIPPiCWZeAzAfNMTiDRgJXluDN:sxPAeIAFcHyEBkGATGrYiyDuyxe (intptr,mIFFTdrbNcbzbukmuqHJRmmAKeH,System.Collections.Generic.IList`1<xJrcpabxFNJEeLKxzDoQfzegzEjy/HgZMwhsohjWIBboQuvWWFfRgqgD>,System.Collections.Generic.List`1<string>,int)
    21. YkKIPPiCWZeAzAfNMTiDRgJXluDN:bVfvLqacePuaRPmfIxvTjQcwpeP (bool)
    22. YkKIPPiCWZeAzAfNMTiDRgJXluDN:.ctor (Rewired.Data.ConfigVars,bool,bool,UcjcCicwSOnbqeWIgHcOdekypFs,uXmfJyNysxkJVMfVjUMqRSBUjHs)
    23. KQMPeTwPTsLuGhkUNxqXEROjtXA:.ctor (Rewired.Data.ConfigVars,bool,System.Func`2<Rewired.BridgedControllerHWInfo, Rewired.HardwareJoystickMap_InputManager>,System.Func`1<int>,bool,bool,bool,bool)
    24. sYGArRodgBwPmjtbrSXkcLAheAe:GxxvpOGdkQAsxVaawpeZQpRKpGz (Rewired.Data.ConfigVars,pdummRpNhhHcNABVOjSMuAZyhxoE)
    25. sYGArRodgBwPmjtbrSXkcLAheAe:.ctor (Rewired.Data.ConfigVars,System.Func`2<Rewired.BridgedControllerHWInfo, Rewired.HardwareJoystickMap_InputManager>,System.Func`1<int>)
    26. Rewired.InputManagers.Initializer:Initialize (Rewired.Data.IConfigVars_Internal)
    27. leHaHiGKLRfwikIkRPeWBAYNSTq:SdmfoteCDVoXNaSlWEvRMBbwmDy (string,System.Collections.Generic.List`1<System.Reflection.Assembly>,Rewired.Data.ConfigVars)
    28. Rewired.InputManager_Base:InitializePlatform (Rewired.Data.ConfigVars)
    29. Rewired.ReInput:nzKJVBylRGKzOZPVGCOtRTDFpUL (System.Func`2<Rewired.Data.ConfigVars, object>)
    30. Rewired.ReInput:SdmfoteCDVoXNaSlWEvRMBbwmDy (Rewired.InputManager_Base,System.Func`2<Rewired.Data.ConfigVars, object>,Rewired.Data.ConfigVars,Rewired.Data.ControllerDataFiles,Rewired.Data.UserData)
    31. Rewired.InputManager_Base:Initialize ()
    32. Rewired.InputManager_Base:Awake ()
    33. UnityEngine.Object:Instantiate<UnityEngine.GameObject> (UnityEngine.GameObject,UnityEngine.Transform)
    34. Myriad.Entry/<>c:<Bootstrap>b__0_0 () (at Assets/Scripts/Entry.cs:27)
    35. Myriad.Assets/<LoadAssetBundles>d__15:MoveNext () (at Assets/Scripts/Assets.cs:180)
    36. UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    37. Myriad.Assets:Initialize (UnityEngine.MonoBehaviour,System.Action) (at Assets/Scripts/Assets.cs:15)
    38. Myriad.Entry:Bootstrap () (at Assets/Scripts/Entry.cs:9)
    39.  
    The game freezes at start when the controller is connected, and this error appears when the controller is disconnected. Reconnecting the controller while the game is running does not seem to work, no input from the reconnected controller is registered.

    At first, I thought the problem was Steam's controller driver, but the problem persists whether or not Steam is running. The only difference is that the controller is identified as Unknown when Steam is not running:

    Code (CSharp):
    1. Rewired: Failed to open HID device for reading. This device (Unknown) may not function.
    2. ------- Rewired System Info -------
    3. Unity version: 2019.4.28f1
    4. Rewired version: 1.1.39.2.U2019
    5. Platform: Windows
    6. Editor Platform: Windows
    7. Using Unity input: False
    8. Primary input source: RawInput
    9. Use XInput: True
    10. Native mouse handling: True
    11. Enhanced device support: True
    12.  
    13. UnityEngine.Logger:LogError (string,object)
    14. Rewired.Logger:LogErrorNow (object,bool)
    15. Rewired.Logger:LogError (object,bool)
    16. Rewired.Logger:LogError (object)
    17. vbkjNjHATCWdCHIMnyXZzpSXcCp:.ctor (int,dBNoePwdKYyWerGenDMKaakIaLZh,intptr,OzVqfYeaMNEXzwFiuZOmGiQFiUf)
    18. YkKIPPiCWZeAzAfNMTiDRgJXluDN:ODInkuxiJQaUAzORvJHYcVcMigY (dBNoePwdKYyWerGenDMKaakIaLZh,intptr,int,OzVqfYeaMNEXzwFiuZOmGiQFiUf,System.Collections.Generic.List`1<TPOFglCEUenQueqhakDnrjLmVbgq>,bool)
    19. YkKIPPiCWZeAzAfNMTiDRgJXluDN:bbUocgDoJKHCOdDcKYXySofQIqKS (dBNoePwdKYyWerGenDMKaakIaLZh,OzVqfYeaMNEXzwFiuZOmGiQFiUf,intptr,uint16,uint16,int)
    20. YkKIPPiCWZeAzAfNMTiDRgJXluDN:sxPAeIAFcHyEBkGATGrYiyDuyxe (intptr,mIFFTdrbNcbzbukmuqHJRmmAKeH,System.Collections.Generic.IList`1<xJrcpabxFNJEeLKxzDoQfzegzEjy/HgZMwhsohjWIBboQuvWWFfRgqgD>,System.Collections.Generic.List`1<string>,int)
    21. YkKIPPiCWZeAzAfNMTiDRgJXluDN:bVfvLqacePuaRPmfIxvTjQcwpeP (bool)
    22. YkKIPPiCWZeAzAfNMTiDRgJXluDN:.ctor (Rewired.Data.ConfigVars,bool,bool,UcjcCicwSOnbqeWIgHcOdekypFs,uXmfJyNysxkJVMfVjUMqRSBUjHs)
    23. KQMPeTwPTsLuGhkUNxqXEROjtXA:.ctor (Rewired.Data.ConfigVars,bool,System.Func`2<Rewired.BridgedControllerHWInfo, Rewired.HardwareJoystickMap_InputManager>,System.Func`1<int>,bool,bool,bool,bool)
    24. sYGArRodgBwPmjtbrSXkcLAheAe:GxxvpOGdkQAsxVaawpeZQpRKpGz (Rewired.Data.ConfigVars,pdummRpNhhHcNABVOjSMuAZyhxoE)
    25. sYGArRodgBwPmjtbrSXkcLAheAe:.ctor (Rewired.Data.ConfigVars,System.Func`2<Rewired.BridgedControllerHWInfo, Rewired.HardwareJoystickMap_InputManager>,System.Func`1<int>)
    26. Rewired.InputManagers.Initializer:Initialize (Rewired.Data.IConfigVars_Internal)
    27. leHaHiGKLRfwikIkRPeWBAYNSTq:SdmfoteCDVoXNaSlWEvRMBbwmDy (string,System.Collections.Generic.List`1<System.Reflection.Assembly>,Rewired.Data.ConfigVars)
    28. Rewired.InputManager_Base:InitializePlatform (Rewired.Data.ConfigVars)
    29. Rewired.ReInput:nzKJVBylRGKzOZPVGCOtRTDFpUL (System.Func`2<Rewired.Data.ConfigVars, object>)
    30. Rewired.ReInput:SdmfoteCDVoXNaSlWEvRMBbwmDy (Rewired.InputManager_Base,System.Func`2<Rewired.Data.ConfigVars, object>,Rewired.Data.ConfigVars,Rewired.Data.ControllerDataFiles,Rewired.Data.UserData)
    31. Rewired.InputManager_Base:Initialize ()
    32. Rewired.InputManager_Base:Awake ()
    33. UnityEngine.Object:Instantiate<UnityEngine.GameObject> (UnityEngine.GameObject,UnityEngine.Transform)
    34. Myriad.Entry/<>c:<Bootstrap>b__0_0 () (at Assets/Scripts/Entry.cs:27)
    35. Myriad.Assets/<LoadAssetBundles>d__15:MoveNext () (at Assets/Scripts/Assets.cs:180)
    36. UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
    37. Myriad.Assets:Initialize (UnityEngine.MonoBehaviour,System.Action) (at Assets/Scripts/Assets.cs:15)
    38. Myriad.Entry:Bootstrap () (at Assets/Scripts/Entry.cs:9)
    39.  
     
  45. CurryKitten

    CurryKitten

    Joined:
    Dec 22, 2016
    Posts:
    36
    Thanks for this. I remember looking for ways to map buttons to element ids before but just couldn't find it. It is a pretty big API :D

    Anyway, I refactored this in, and now all is good - and obviously more robust should any controller mappings change.
     
    guavaman likes this.
  46. monokelvivien

    monokelvivien

    Joined:
    Oct 10, 2019
    Posts:
    7
    Thanks! Just in case you find something in the settings, I've attached the Windows settings. Thanks for your insight, I will look into the Steam documentation and hopefully get this issue eliminated.
     

    Attached Files:

  47. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Debug Information is the best way to determine what is happening:

    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information

    Read the checklist to understand what goes into the input stack. Any problem in that stack will cause input to not work.
     
  48. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    That means the Windows API function CreateFileW is failing and returning an invalid handle. This is a non-optional function call to access a HID device Finding the solution to this is going to be a guessing game.

    My guess is that you have some software on your system that is opening this device in an exclusive mode, therefore causing the function call to fail when Rewired tries to open it in a shared mode. You will have to find out what software you have installed that is doing this and remove or disable it.

    This is also just a guess, but disable Unity's new input backend if you have it enabled:
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#not-compatible-unity-new-input-system

    The fact that the controller is showing up as Unknown when Steam is not running is totally incorrect. This leads me to believe something on your system is interfering with HID device exposed for the DS4. It's probably some kind of DS4 driver / mapping software. Rewired would only see that controller as Unknown of the identifying information provided by the controller does not match the information in the controller definition -- vendor id, product id, name, element counts.
     
  49. mbhagat

    mbhagat

    Joined:
    Dec 15, 2013
    Posts:
    49
    It is related to certain users and not all.
    I have tested in 4-5 devices I have and it works and then I used for production.

    But many users are reporting they are facing issue because mobile touch pad is not visible at all.
    Your short answer is not helpful.
    Please give proper explanation of steps I should take to find out what can be actual reason for controls not displaying in some devices. If not displaying in all then it would be easy for me to trace but for certain devices issue you know better,
     
    Last edited: Jun 23, 2021
  50. Spabbage

    Spabbage

    Joined:
    Feb 15, 2015
    Posts:
    37
    Hey.

    I'm working on remapping input. I find an ActionElementMap I want to replace, wait for ControllerPollingInfo from PollForAllElementsDown then replace the old element map with the newly polled button.

    This is working great for buttons replacing buttons but doesn't work if I want to replace a button with an axis (e.g. R2 trigger on a controller). Below is my current ElementAssignment setup, is there anything I'm doing wrong there?

    Code (CSharp):
    1. private void UpdateAssignment(ControllerMap controllerMap, ActionElementMap oldMap, ControllerPollingInfo newAssignmentPollingInfo)
    2.         {
    3.             ElementAssignment elementAssignment = new ElementAssignment(
    4.                oldMap.controllerMap.controllerType,
    5.                oldMap.elementType,
    6.                newAssignmentPollingInfo.elementIdentifierId,
    7.                oldMap.axisRange,
    8.                newAssignmentPollingInfo.keyboardKey,
    9.                oldMap.modifierKeyFlags,
    10.                oldMap.actionId,
    11.                newAssignmentPollingInfo.axisPole,
    12.                oldMap.invert,
    13.                oldMap.id
    14.                );
    15.  
    16.             controllerMap.ReplaceElementMap(elementAssignment);
    17.         }