Search Unity

Rewired - Advanced Input for Unity

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

  1. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Hi,

    in Unity 2019.3.12f1
    Rewired 1.1.29.3

    i get this error

    Signature.JPG

    after every project start.


    After every build
    i get these errors

    Rewired01.JPG

    You said that this error
    "Report this to Unity. This is their error. I cannot fix it. Unity is responsible for handling all assembly managemen."

    I will do an bug report to Unity but can you give me some additional hints what i should write?
    I think i need some more information in addition to

    to reproduce
    • create empty Unity 2019.2.x project
    • import Rewired v1.1.29.3
    • build (winx64 , .Net 4.x)
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Is this Unity 2019.3 or 2019.2? At the top you state 2019.3, then at the bottom 2019.2.

    This error is already a known error shown as the bold notice at the top of the Rewired documentation. You do not need to report it if you are using 2019.2:
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#assembly-errors-2019-2

    Unity has supposedly fixed this in Unity 2020.1.0a13. I do not know if they will port this fix to 2019.2 or 2019.3. Moving Unity UI to the package manager has been a huge, time-consuming pain in the backside.
     
  3. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    Thanks for the info.
    and sorry for the typo. It happens in 2019.2.x.
     
  4. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Rewired 1.1.29.4 is available on the Unity Asset Store.

    See Updating Rewired before updating.

    1.1.29.4:

    Changes:
    - Increased stick dead zones on Nintendo Switch Pro Controllers on all non-Switch console platforms.

    Bug Fixes:
    - Fixed transposed Options and Menu button mappings on Stadia Controller definition on all platforms.
    - Fixed transposed Options and Menu button mappings in Gamepad Template for Stadia Controller.
    - Fixed inverted Right Stick Y mapping on Nintendo Switch Pro Controller on OSX Standalone, Native.
     
  5. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    Thanks for the new release. Have a Happy Thanksgiving.
     
    guavaman likes this.
  6. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Thanks! Happy Thanksgiving to you as well.
     
  7. Avalin

    Avalin

    Joined:
    Oct 12, 2018
    Posts:
    98
    Is Rewired good for point and click games as well?
     
  8. NobleRobot

    NobleRobot

    Joined:
    Jan 14, 2016
    Posts:
    56
    It does Mouse "maps," so I'd say yes! And it would certainly make it easier for you to, either as you develop or at some future point, port a mouse-based point and click game to also allow the player to use a controller or keyboard for input.

    The benefit of a system like Rewired is that it abstracts the game's actions from the system's hardware buttons, so your code might have an action called CLICK which the game listens for, and you'd map that action to the left mouse button of course, but you can also map it to the A button on a controller and the Enter key on a keyboard all within Rewired's UI directly in the editor without needing to write extra code.

    A point and click probably doesn't need a lot of actions (pause, inventory, and maybe a few other keyboard shortcuts depending on your design), so a full system like Rewired might seem like overkill, but it's not very demanding on your project and it's pretty easy to use once you learn how it works.
     
    guavaman likes this.
  9. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    guavaman likes this.
  10. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
    Hi @guavaman. Do you plan to make Rewired compatible with Unity 2019.3?
     
  11. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    No. Unity has to fix their bugs before Rewired can work without intermittent build errors. There is absolutely nothing I can do to change my code to make it fix or work around their bugs.
     
  12. SkymapPatrick

    SkymapPatrick

    Joined:
    Aug 30, 2019
    Posts:
    4
    Hey Guavaman! Much appreciate for the awesome plug-in!

    I am currently doing some console work and when crawling through the memory on device I noticed that all the HardwareJoystickMaps, 97 total, are loaded into memory. I'd like to get that down to only the supported controllers to free up some memory.

    Is this due to the Rewired Data file only have the "Dual Analog Gamepad Template" map set?

    Cheers,

    Patrick
     
  13. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    The entire set of controllers takes 3.6 MB of memory in a build. Removing these won't save you much. Unity as no platform-dependent serialized data management apart from Asset Bundles.

    Removing controllers instructions here:
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#increased-compile-play-time-editor

    Templates require their HardwareJoystickMaps to work. If you remove the DS4 definition, the Gamepad Template will not longer apply to that controller.
     
  14. ink13

    ink13

    Joined:
    Nov 14, 2013
    Posts:
    37
    Hey - sorry to be a pain. I can't figure out how to get a click input off of the Apple TV remote. Everything else is receiving fine...

    Code (CSharp):
    1. if (player.GetButtonDown("JoystickButton"))
    2.         {
    3.             ButtonDown = true;
    4.             TouchPadClickIn.text = "Button press";
    5.         }
    6.         if (player.GetButtonUp("JoystickButton"))
    7.         {
    8.             ButtonDown = false;
    9.             TouchPadClickIn.text = "Button off";
    10.         }
    I had been following along like so, but can't get anything out from it... Am I missing something?
     
  15. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    The only way this code would work is if you have an Action named "JoystickButton" assigned to "Touchpad Click" in the Controller Map for Apple TV Remote.

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

    ink13

    Joined:
    Nov 14, 2013
    Posts:
    37



    This was me trying; can you see anything obvious? https://imgur.com/a/i1Tf3eg

    I did mention to get there with just the plain :


    Code (CSharp):
    1. if (Input.GetKeyDown(KeyCode.JoystickButton14))
    2.  
    3.  
    4.         {
    So, not sure...
     
  17. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    1. Is the Joystick Map "Default", "Default" assigned to your Player on the Players page of the Rewired Input Manager?
    2. Are you loading outdated saved user mappings that contain that did not have this assignment at the time of being saved, overwriting what you are setting in the Rewired Input Manager?
    Input.GetKey(KeyCode.Joystick#Button14) is exactly what Rewired does internally to get the value of the touchpad click. You can see this for yourself if you want in the HardwareJoystickMap for the Apple TV Remote.

    fewafew.png
     
  18. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    41
    Hey @guavaman, I need your help.

    I'm having trouble in adding xbox one controller support for my game. So far I only made basic map with basic control like A for jump and X to shoot. But it just doesn't work: doesn't detect any input from my xbox one controller.

    I tried the following steps:

    1. Assigned the map to the player.
    upload_2019-12-6_14-51-9.png

    2. I created multiple maps just in case, for gamepads, xbox 360, and xbox one.
    upload_2019-12-6_14-54-41.png

    3. I also read through the documentation and followed everything relevant like enabling XInput, etc. But I don't have the xbox one plugin since I don't need (yet) those extra features. Let me know if it's actually required.

    4. Tried both directly in unity and game build. Didn't work.

    My OS is Windows 10, Unity version 2018.4.12f1. And the game is for Windows standalone, for now. I tested the controller with other games and it works fine, so it can't be the controller's issue.

    Let me know if I'm missing something (this is my first time implementing controller support so I don't know a lot of stuffs!) or if you need any more details. Thanks in advance!
     
    Last edited: Dec 6, 2019
  19. clawsofanbear

    clawsofanbear

    Joined:
    Sep 4, 2019
    Posts:
    3
    Hello,

    I've been searching for a while but I haven't been able to find the awnser.
    Is there a way to simulate Unity's InputString and compositionstring (for ime support)
    The closest I was able to find is keyboard.PollForAllKeys(/down/up) but there's no way to tell if these keys are ASCII characters.

    Have a great day and thanks in advance!
     
  20. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633


    Use this:
    https://guavaman.com/projects/rewir...l#debug-information-diagnosing-input-problems

    Your problem may be and probably is something you're not expecting. It may not even be related to Controller Maps. For example, you may have multiple controllers on your system even if you don't realize it. Virtual controllers, etc.

    There is no reason to do this. The Gamepad Template will cover XInput devices.

    XInput is part of Windows. You do not have to install it and you cannot remove it. If you have Use XInput enabled, it will use XInput. There is no separate Xbox controller plugin.

    Why did you remove all controller definitions except Xbox controllers? This means your game will only be able to support Xbox controllers without user configuration as an Unknown Controller.
     
  21. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    No. Rewired does not provide text input. There is no advantage to using Rewired for text based input over Unity.
     
  22. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    323
    So if we are going to use 2019.3 then this product is now worthless?
     
  23. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Rewired is not worthless. I don't know where you got this information. Unity 2019.3 has an error that is simply annoying and does not prevent it from working. Press build twice. It fails the first time with a Unity UI error. Do it again and it works. That's it. This is their issue related to their UI system and there is absolutely no way I can possibly fix it.

    I see no issues building in the latest pre-release of Unity 2019.3.
     
    Last edited: Dec 6, 2019
  24. clawsofanbear

    clawsofanbear

    Joined:
    Sep 4, 2019
    Posts:
    3
    Alright, much appreciated. Thank you for your time and keep up the good work!
     
  25. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    109
    Hi @guavaman! I hope you are well, glad to see you still active on the forums.
    I know this has been asked before, but the answer was not conclusive. I would like a little advice when you have time.

    I'm trying to adapt your controller glyphs scripts to support keyboard. It would be nice to have the keyboard glyphs assigned in that heirachy neatly with the others.Is it possible to use a HardwareJoystickMap for the keyboard? I don't know why it gets 5 for E but it works. That's the integer that elementIdentifierId returns, I don't know why.

     
  26. tosiabunio

    tosiabunio

    Joined:
    Jun 29, 2010
    Posts:
    115
    Would scripting the build process bypass this issue?
     
  27. longroadhwy

    longroadhwy

    Joined:
    May 4, 2014
    Posts:
    1,551
    @guavaman,

    Have you run into problems with USB devices related to usb selective suspend on Windows? I ran into this issue with an external USB blu-ray writer. Turning this off (disabling it) solved the problem. I wonder if this is causing some of the other strange things end users are running into with game controllers not working as expected?

    This is steps on how to disable can be found here:

    Windows 7 and 8.x:

    https://www.sevenforums.com/tutorials/147369-usb-selective-suspend-turn-off.html

    Windows 10:

    https://www.windowscentral.com/how-prevent-windows-10-turning-usb-devices
     
  28. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    No. As the name implies, HardwareJoystickMap only applies to Joysticks. There is no such map of any kind for the keyboard.

    Because that's the element identifier id value of E. See the CSV file:
    https://guavaman.com/projects/rewired/docs/HowTos.html#display-glyph-for-action-keyboard
     
  29. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Very likely not. Best I can tell, it has something to do with Unity's order of operations when creating a build. Something in the build process isn't correctly linking the UnityUI assembly from the Package Manager before dealing with serialized data that depends on that assembly so it generates errors saying the UnityUI class/struct that was serialized in some MonoBehaviour doesn't exist in the built data, it sees the inconsistent number of fields, then dies. The 2nd run works, meaning the assembly was loaded and referenced correctly on the first build, probably after the serialized data process occurred. After each re-compile, the process repeats. This is far too low in the weeds to positively diagnose without Unity's source code, but even with it, there would be no workaround.

    The point is moot anyway. As I posed here, the problem doesn't appear to be happening on the latest 2019.3 pre-release.
     
    tosiabunio likes this.
  30. haywirephoenix

    haywirephoenix

    Joined:
    May 17, 2017
    Posts:
    109
  31. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    41
    @guavaman
    Checked the debug information and it says no joystick!
    upload_2019-12-9_12-54-2.png
    So what must I do now?

    I don't know. It was the previous programmer who probably did it. I will recreate it later after dealing with this issue.
     
  32. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Then the problem is outside Rewired. If Use XInput is enabled and Rewired's showing no joysticks, the problem is at the Windows driver level or there's something wrong with your controller, USB port, or something else.

    He replaced the link in the inspector to point to EditorControllerDataFiles. This is a custom ControllerDataFiles variant he made probably based on this info:
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#increased-compile-play-time-editor

    Link it back to the original that comes with Rewired in Assets\Rewired\Internal\Data\Controllers for full controller support.

    I also suggest you update Rewired to the latest version:
    https://guavaman.com/projects/rewired/docs/Updating.html
     
  33. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    I haven't ever run into a problem with that feature. I have had certain game controllers prevent the system from sleeping, the screen saver going on, or causing the system to wake up at random. I've never had a controller simply not work though.
     
  34. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    41
    But I can play other games like cuphead with it. And I can open the xbox overlay too (can't take the ss). :/

    Do you think it's a version issue? The previous programmer seem to use his unity account to purchase rewired. So if it's required I will talk to the boss and purchase it again.

    Btw, is there something wrong with this setup?
    upload_2019-12-9_15-0-41.png
    I also tried XInput for primary input source but still no luck.
     
    Last edited: Dec 9, 2019
  35. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    There is no possible configuration you could use in the Rewired Input Manager that would cause the Joystick to not appear. Joystick creation is not dependent on Controller Maps or Players in any way. Regardless of the input sources you choose, a Joystick will still be created if one is visible on the system. Joystick creation happens at the low-level. When a device is detected by the input source in use (Raw Input, Direct Input, XInput, Unity Input, etc.), it is created and a HardwareJoystickMap controller definition is looked up. If one is found that matches information provided by the controller it is used. If none is found that matches, it uses the Unknown Controller. Either way, a Joystick WILL be created if one is found at the OS/input source API level.

    Is Cuphead running in Steam? Are you running Rewired in Steam? Steam essentially takes over XInput and does what it wants with it. Testing Rewired outside Steam and some other game like Cuphead in Steam isn't an even comparison. There's no telling what Steam is doing at the driver level that isn't available to the XInput devices in Rewired running outside of Steam. There are also other input API's available like Windows 10 Windows.Gaming.Input that may be being used. The only way you can fairly test this is to compare using some game that is not running in Steam and that uses XInput. But easier is to use other tools and not games to compare.

    If you are testing your game in Steam (you have some Steam plugin installed that is activating Steam and notifying it of your game), then this is almost certainly a Steam configuration problem because Steam does have the power to make controllers not appear to XInput. Lots of documentation on Steam here.

    1. Go to the Start Menu, click it, and type USB. Open Setup USB Game Controllers. Does your controller appear? Does it function when you move it around? This is Microsoft's Direct Input tool. It doesn't test XInput, but will give some indication whether things are partially working or not working at all.

    2. Does it work in UnityEngine.Input? When you plug and unplug the controller do you see a message logged in the console saying the it was connected or disconnected? Open Rewired/DevTools/UnityJoystickElementIdentifier scene and press Play. Does anything show up? Do joystick elements work?

    2. Test with another XInput testing tool or library. I've attached my own testing tool. This runs completely independently of Rewired, but it's exactly what happens underneath the hood. This is showing you exactly what XInput is reporting exists. If nothing appears here, XInput is not working on your system with this controller. Remove the controller in Device Manager and let it reinstall itself.

    My guess is none of the above will work based on what you've shown me with Rewired's Debug Information.

    Are there any warnings or errors logged in the console?
     

    Attached Files:

    Last edited: Dec 9, 2019
  36. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    @guavaman Hi, I use an input magnitude to set the movement speed i my game as follow:

    inputX = player.GetAxis ("Horizontal");
    inputY = player.GetAxis ("Vertical");
    inputMagnitude = Mathf.Clamp01(new Vector2(inputX, inputY).sqrMagnitude);

    When I let go the joystick it makes my movement blend tree snap back to the slow walk all the way from the sprint animation.... not very pretty.

    Doesn't happen on keyboard because of the gravity setting, I was wondering if there was a gravity setting for the joystick input or something else I can do to get a less "direct" return to 0 on the joystick input.

    Thank you.

    Bonus Question:

    As per the manual, rewired appears to handle remapping the square input of joystick to radial but this blog documents an exception for xbox controllers https://amorten.com/blog/2017/mapping-square-input-to-circle-in-unity/

    Is this taken into account by rewired?
     
    Last edited: Dec 9, 2019
  37. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    No on both counts. Rewired's input system is not designed for you to manipulate and modify input values internally to process them for your game's consumption before they come out of the input system. If you need to process the input values for the specific needs of your game (speeds, other reactions), process them after you've gotten them from the input system. The input system is designed to tell you what the user wants to do (user intent), not be giving you direct movement values to apply to a character. Adding a gravity to a joystick axis value will result in lag.

    Rewired does not remap the outputs of analog joysticks to fit a specific shape. Each controller may be different. Rewired outputs the shape provided by the hardware. The vast majority of gamepads I've worked with output a rough circle including the Xbox controller -- a very slightly cropped circle, slightly flat near the 4 cardinal directions, but mostly circle. Test it in the Windows USB controller tool. I've seen only one very old gamepad from around 2000 output a square.
     
    Last edited: Dec 9, 2019
  38. HenryStrattonMK

    HenryStrattonMK

    Joined:
    Jul 31, 2018
    Posts:
    2
    Got a problem that I'm hoping is just a simple solution that I've not managed to locate yet.
    If a scene starts with a controller attached, and I disconnect and reconnect the controller, it can still control the UI navigation without any issue. However if the controller is not attached when the scene starts, and is then connected afterwards. It has no ability to navigate the UI.

    This is currently causing an issue where if you disconnect and reconnect the controller during a scene change, the game becomes unresponsive and soft locks on the menu.

    Is there any way to "Refresh" the UI controls so that the newly connected controller is able to control the UI?
     
  39. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Rewired provides a RewiredStandaloneInputModule which interacts with the EventSystem, but Rewired is not itself in charge of anything in the UI system. All Rewired's component does is read Action values from the Player and forwards these events to the EventSystem. Beyond that, Rewired is completely out of the equation.

    You are controlling the UI with a controller. The EventSystem MUST have a selected GameObject with a Selectable component on it in order for keyboard or controller input to affect the UI. This is how Unity's EventSystem and Selectable navigation works. See this: RewiredStandaloneInputModule FAQ - Problem: Unity UI navigation with joystick or keyboard doesn't work.

    Rewired does not select or deselect GameObjects. One must be selected for joystick/keyboard UI navigation to do anything. The fact that a controller is connected or not will not have any impact on what objects are selected in a scene. It will also have no impact on Rewired's ability to send UI navigation events because these values are drawn from the Player, not the Controller. The RewiredStandaloneInputModule reads Player.GetAxis or Player.GetButtonDown to determine if a navigation event should be sent. If the Player has a Controller assigned that maps the UI Actions, it will work for UI navigation.

    If this Controller is being assigned to a different Player that does not have UI control permissions, it will not control the UI.

    As is always the case, you should use the tools provided to debug your problem:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information
     
    Last edited: Dec 10, 2019
  40. HenryStrattonMK

    HenryStrattonMK

    Joined:
    Jul 31, 2018
    Posts:
    2
    Thanks for the clarification Guavaman! Will keep looking into it.
     
  41. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    41
    @guavaman
    Ah that's it! I had steamwork installed, tried on other scene which doesn't initialize steamwork and the joystick appears.
    upload_2019-12-10_9-54-29.png

    Once I got steamwork initialized it can no longer detect the joystick after unplugging it. I have to re-open unity in order to get it detected again. But there is no error/warning message relevant to this issue printed for me!

    Thanks for your help so far! Now I will try tinkering around it.

    EDIT:
    Just want to confirm again, since I have gamepad map I don't need the xbox 360 and xbox one maps anymore right? And how about dualshock controllers? Aren't those included in gamepad map as well?
     
    Last edited: Dec 10, 2019
  42. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Steam has a bunch of settings that will affect this including your game's default configuration VDF file for Steam Controller, the user's settings for the Steam Controller and Steam controller configuration, and your setting in the Steam developer backend for the game's controller configurations. Refer to Steam's documentation for configuring input.

    This is very likely your problem:
    https://guavaman.com/projects/rewir...l#steam-windows-steam-controller-unity-editor

    See the Supported Controllers list:
    https://guavaman.com/projects/rewired/docs/SupportedControllers.html

    Every game with a gamepad icon is supported by the Gamepad Template.

    Dual Shock 4's touchpad button is not mapped on the Template, so an override mapping is required if you want to map that. Some controllers may have Layouts defined for different regions like DS4 and Nintendo Switch to swap buttons. If you did not create these mappings, be sure you're not deleting something that is used in some other configuration,
     
  43. vladimir-fs

    vladimir-fs

    Joined:
    Nov 28, 2019
    Posts:
    23
    Hey everyone,

    I'm looking for some help. I have an ActivateAbility action set up in Rewired. I've mapped it to the Up key on the keyboard. In the game I detect whether the ActivateAbility action was triggered by a single or double button up. This works fine if pressed by itself. If I'm holding left or right on the keyboard and then pressing Up the ActivateAbility action is never triggered.

    What's the best way to detect an Up key while moving/holding down other keys?

    Thank you so much,
    Vladimir
     
  44. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Get a different keyboard:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#key-jamming

    Rewired will not prevent any number of keys or buttons from activating at the same time. If it's the keyboard, no software can fix a hardware issue.

    If this is not the problem, then it's likely in your code. Use Debug Information to see whether the Action is activating:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information
     
    vladimir-fs likes this.
  45. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    41
    @guavaman,

    Hey, I'm currently trying to display glyph for multiple controllers but got a little confusion. I checked your table which says that xbox one's guid is 19002688-7406-4f4a-8340-8d25335406c8. But when I tried to debug my xbox one's controller guid in unity, it prints d74a350e-fe8b-4e9e-bbcd-efff16d34115, which according to your table is actually xbox 360's guid. We dont have xbox 360 controller yet so we can't check it. Any idea of what's happening here?

    The table:
    upload_2019-12-12_12-41-38.png
     
  46. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    Please see the documentation:
    https://guavaman.com/projects/rewired/docs/ControllerMaps.html#xinput-devices-windows
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#windows-xinput-devices-use-x360-map
    https://guavaman.com/projects/rewir....html#windows-xbox-one-controller-doesnt-work
     
  47. Kazeon

    Kazeon

    Joined:
    May 22, 2017
    Posts:
    41
  48. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Hi there, I've noted earlier in the forums that there appears to be a new unity bug causing some issues with rewired.

    This issue is appearing in 2019.2.16f1:



    I try to select any component in the hierarchy view with a touch controller component included on it and it spawns a bunch of touch button children and selects those (so I can't select the touch controller component) outputting this error in console.

    Code (CSharp):
    1. ArgumentException: GUILayout: Mismatched LayoutGroup.repaint
    2. UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type layoutType) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:311)
    3. UnityEditor.EditorGUILayout.BeginVertical (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9131)
    4. UnityEditor.EditorGUILayout.BeginVertical (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9121)
    5. XQKVLVlcwYnhMQFfAnWzmdeuCeN.‬‍‌‬‌‎‏‌‍‍‬‎‎
‏‏‭
‍‭‮‪‮ (UnityEngine.GUIStyle , UnityEngine.GUILayoutOption[] ) (at <6ec0d4e7d35742b787a61e68f9fc64f9>:0)
    6. XQKVLVlcwYnhMQFfAnWzmdeuCeN..ctor (System.Boolean vertical, UnityEngine.GUIStyle style) (at <6ec0d4e7d35742b787a61e68f9fc64f9>:0)
    7. Rewired.Editor.ComponentControls.TouchControllerEditor.‬‎‫
‏‪‭‪‮
‍‫‭‌‏‎‌‫‏‍‮‏‮ (System.Boolean , UnityEngine.GUIStyle ) (at <6ec0d4e7d35742b787a61e68f9fc64f9>:0)
    8. Rewired.Editor.ComponentControls.TouchControllerEditor.OnInspectorGUI () (at <6ec0d4e7d35742b787a61e68f9fc64f9>:0)
    9. UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
    10. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    11.  
     
  49. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    5,633
    I cannot reproduce this.

    In order for what you're showing me to happen, the Unity Editor function GUILayout.SelectionGrid has to be returning a value of 0 when called and passed value of -1 with no user interaction 4 different times in a row. GUILayout.SelectionGrid requires user interaction in order to return any value different than the value passed in the function call.

    Either this is some kind of Unity bug with GUILayout.SelectionGrid that I cannot reproduce on the exact same version of Unity or something else is going on here. I suspect the latter.

    I have seen absolutely inexplicable things before reported by users regarding Unity's editor GUI. One user was unable to install Rewired correctly because his system was automatically forcing it to submit a button on the editor modal windows that pop up during install. He was doing absolutely nothing and it was automatically selecting the cancel option every single time. I suspected either some Unity editor plugin or some other Windows application designed to automate things I never found out why this happened to him and him alone.

    Either way, I have absolutely no way of fixing something like this. I can only make my systems using the tools provided by Unity. If these tools fail to work for whatever reason when used correctly, I have no recourse. All I can suggest is you try doing it on a different computer.
     
    andrew210 likes this.
  50. andrew210

    andrew210

    Joined:
    Apr 23, 2014
    Posts:
    241
    Thank you, reassuring that this isn't seen often and is something just obscurely set up with my unity / project/ editor. After reading through this thread I feel your pain having to do your best to mitigate for a constantly changing environment with unity and it's a wonderful asset you've created and your hard work is appreciated!
     
    Avalin likes this.