Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Rewired - Advanced Input for Unity

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

  1. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    324
    @guavaman Oh my goodness, sorry it makes sense now.

    Thank you for your time and write up!
     
  2. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Rewired 1.1.31.0 has been uploaded to the asset store and will likely be available some time next week.

    This update brings with it some breaking API changes for the first time in 3.5 years, so be aware that there may be compiler errors when you import the update. This was necessary due to issues in games left running for days or weeks on end running into problems with floating point precision in time calculations. Who leaves a game running for days or weeks? A certain portable console favored by plumbers and mushroom aficionados actually continues to update some values in the background when in sleep mode making this change necessary. This change will allow you to leave your game running for over 3,000 years without facing time precision issues. It should be noted that Unity's own Time class does not use double-precision values for time and will run into precision issues after several days of use, though delta time is calculated with higher precision than time or unscaledTime.

    The breaking change is internal as well as public, so plugins (Switch, Stadia) must be updated as well. The updated plugins are already available, as is main Rewired update for registered users.

    1.1.31.0:

    Changes:
    - *** BREAKING CHANGE *** Changed all time calculations to use doubles to avoid issues with time measurement precision loss when application runs for days or weeks. All members that return time values now return a double value instead of a float value.
    - RewiredStandaloneInputModule: Changed to use double precision time.
    - Improved accuracy of identifying reconnected controllers on some platforms.

    API Changes:
    - Changed return type of the following to double:
    - Controller.GetButtonTimePressed
    - Controller.GetButtonTimeUnpressed
    - Controller.GetButtonLastTimePressed
    - Controller.GetButtonLastTimeUnpressed
    - Controller.GetButtonTimePressedById
    - Controller.GetButtonTimeUnpressedById
    - Controller.GetButtonLastTimePressedById
    - Controller.GetButtonLastTimeUnpressedById
    - Controller.GetLastTimeActive
    - Controller.GetLastTimeAnyElementChanged
    - Controller.GetLastTimeAnyButtonPressed
    - Controller.GetLastTimeAnyButtonChanged
    - Controller.Axis.lastTimeActive
    - Controller.Axis.lastTimeActiveRaw
    - Controller.Axis.lastTimeInactive
    - Controller.Axis.lastTimeInactiveRaw
    - Controller.Axis.lastTimeValueChanged
    - Controller.Axis.lastTimeValueChangedRaw
    - Controller.Axis.timeActive
    - Controller.Axis.timeActiveRaw
    - Controller.Axis.timeInactive
    - Controller.Axis.timeInactiveRaw
    - Controller.Button.timePressed
    - Controller.Button.timeUnpressed
    - Controller.Button.lastTimePressed
    - Controller.Button.lastTimeUnpressed
    - Controller.Button.lastTimeStateChanged
    - ControllerWithAxes.GetAxisTimeActive
    - ControllerWithAxes.GetAxisTimeInactive
    - ControllerWithAxes.GetAxisLastTimeActive
    - ControllerWithAxes.GetAxisLastTimeInactive
    - ControllerWithAxes.GetAxisRawTimeActive
    - ControllerWithAxes.GetAxisRawTimeInactive
    - ControllerWithAxes.GetAxisRawLastTimeActive
    - ControllerWithAxes.GetAxisRawLastTimeInactive
    - ControllerWithAxes.GetAxisTimeActiveById
    - ControllerWithAxes.GetAxisTimeInactiveById
    - ControllerWithAxes.GetAxisLastTimeActiveById
    - ControllerWithAxes.GetAxisLastTimeInactiveById
    - ControllerWithAxes.GetAxisRawTimeActiveById
    - ControllerWithAxes.GetAxisRawTimeInactiveById
    - ControllerWithAxes.GetAxisRawLastTimeActiveById
    - ControllerWithAxes.GetAxisRawLastTimeInactiveById
    - ControllerWithAxes.GetLastTimeAnyAxisActive
    - ControllerWithAxes.GetLastTimeAnyAxisChanged
    - Keyboard.GetKeyTimePressed
    - Keyboard.GetKeyTimeUnpressed
    - Keyboard.GetModifierKeyTimePressed
    - Keyboard.GetModifierKeyTimeUnpressed
    - ReInput.TimeHelper.unscaledTime

    Behavior Designer Integration:
    - Updated to reflect return value type change of time functions. Behavior Designer does not support double-precision values, so return values are cast to floats.
    - Added RewiredGetKeyboard
    - Added RewiredGetMouse
    - Added RewiredPlayerSetHasKeyboard

    PlayMaker Integration:
    - Updated to reflect return value type change of time functions.

    Corgi Engine Integration:
    - Removed usage of InformationAttribute due to breaking change in later versions of Corgi Engine causing compiler errors.
     
    Last edited: Mar 28, 2020
    rxmarccall and Bartolomeus755 like this.
  3. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    If you're a Rewired user and you love it (or hate it), please post a review on the asset store. It will help others who are on the fence decide to try it (or not).

    Also, if you want to share what game(s) you've made with Rewired here, feel free to post. I always love to see what people are making with Rewired.
     
    NateReese77 likes this.
  4. LucidDreamsStudio

    LucidDreamsStudio

    Joined:
    Sep 21, 2018
    Posts:
    7
    Hello, I read your entry about the limitation of using XInput for Xbox One controller being detected as an Xbox 360 controller.. However, I'm quite intrigued on why I am getting the following message Joystick connected ("Controller (Xbox One For Windows)") when connecting my Xbox One controller. At some point in the detection process, it does detect that it is an Xbox One controller and not a Xbox 360 controller, right? I'm really curious to hear why this is happening. Is it because this specific detection process, in the editor, is not using XInput?
     
  5. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Exactly.

    The console is not using XInput to display that information, it's using information from the HID device.

    Unity has been fusing XInput and HID for XInput controllers for years on Windows. This is why Unity reports HID names and you can still press the L/R triggers at the same time without the triggers cancelling each other out on the first 4 XBox Controllers. Problem is, there simply is no reliable way to fuse these devices because Microsoft gives you no way to associate an XInput device id to a HID device. I don't know how Unity attempts it, but there are various exotic ways have been used in the past such as trying to watch the HID devices while simultaneously watching the XInput devices to try to make associations between the devices by watching button and axis values. I saw some proposed changes to SDL 2 that included this in the past. I sure hope they abandon it and don't roll it in because It's a complete hack. All attempts to fuse these devices so you can get HID information from an XInput device fail at some point or another with multiple controllers attached. That's why you will see many complaints on the forum about using multiple XInput gamepads and device cross up scenarios like this. Rewired will never attempt this kind of "fusion" to work around Microsoft's design decision.

    If you have any questions about the capabilities of XInput, you can find all the information available about XInput form Microsoft and read the API to see what information can be obtained about controllers:
    https://docs.microsoft.com/en-us/windows/win32/xinput/getting-started-with-xinput
    https://docs.microsoft.com/en-us/windows/win32/xinput/functions
    https://docs.microsoft.com/en-us/windows/win32/xinput/structures
     
    Last edited: Apr 1, 2020
    LucidDreamsStudio likes this.
  6. Armetron

    Armetron

    Joined:
    Oct 7, 2016
    Posts:
    26
    Hello, I'm having some difficulty using my Dualshock 4 controllers with Rewired. When I plug one of them in Unity detects a new joystick called "Wireless Controller" however for some reason Rewired does not detect it as a standard gamepad, or even a Dualshock controller. I have opened up your example project 'DualShock4SpecialFeatures' which from my understanding is already preset to use a Dualshock 4 controller. However when running the scene nothing happens. Rewire does not find a Dualshock 4 controller.

    I have my Dualshock connected via usb

    Edit: Looking at the debugger I can see that Rewired has identified a Gamepad and has labeled it as a Dualshock however for some reason none of the inputs are updating. I've checked the Windows 10 gamepad property window and my pc is receiving input data from the controller. Yet on rewired everything remains at 0. I have tested with an xbox controller and inputs are working perfectly for it
     
    Last edited: Apr 1, 2020
  7. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    I need more information:

    1) Editor Plaform.
    2) Rewired version.
    3) Unity version.
    4) Rewired settings for the platform in question. Ex: Settings -> Windows.
    5) Model number of Dual Shock controller (sticker on back).
     
  8. Armetron

    Armetron

    Joined:
    Oct 7, 2016
    Posts:
    26
    Editor Platform: Windows
    Rewired Version: 1.1.32.0
    Unity version: 2019.3.5f1
    Rewired Settings: not sure where to find this but I did the default basic setup a few hours ago
    Model number for DualShock controllers: CUH-ZCT1U for both of them (I have two controllers, neither one worked)
     
  9. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Thanks.

    Settings are in the Rewired Input Manager. Every platform has its own settings:



    Base on the information you provided, it should be working. Unfortunately, there's nothing I can do to make it work if it's not working on your system. The only thing you can do is to disable Enhanced Device Support. This will use standard Raw Input information instead of the special mode that makes it possible to set lights, vibration, read gyro, etc.

    The device is not sending input reports to the application or the application is not receiving them. There may be some drivers or software installed on your system that are preventing it from working. Try a different USB port and different USB cables. Those are the only things I can possibly think of that could affect this.

    If Unity's new input system backend is enabled, disable it:
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#not-compatible-unity-new-input-system
     
  10. Armetron

    Armetron

    Joined:
    Oct 7, 2016
    Posts:
    26
    Hmm, that is weird, because I checked in Window's device properties and it was showing the inputs working directly from the controller
     
  11. Armetron

    Armetron

    Joined:
    Oct 7, 2016
    Posts:
    26
    Ok so I went into the Rewired Editor Settings and I set the Primary input Source on the windows tab to DirectInput and I'm now reciving input updates on the debugger. However like you mentioned above I dont have access to the Enhanced Device Support so the vibration and gyro is not available
     
  12. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Windows device properties is not using direct HID report communication with the device. Rewired's Enhanced Device Support is hand-written code to communicate with the device at a very low level, sending and receiving HID reports in the device's native format so that the device enters PS4 mode and activates all the special features. Windows cannot do this on its own. None of this special information is available through the standard HID driver. What you are seeing in the Windows device properties is exactly what you will see if you disable Enhanced Device Support. Changing it to use Direct Input will not help you at all. Rewired's Direct Input mode does not support Enhanced Device Support. Even if it did, it would simply use the exact same code path as the Raw Input Enhanced Device Support.
     
  13. Loewi_f

    Loewi_f

    Joined:
    Nov 13, 2019
    Posts:
    12
    Touch joystick can move to touch postion.But, when i click screen on a UI element,which is also in touch region for joystick, the joystick still move to touch postion.This is not what I want to do.How could I do to avoid joystick touch when click UI elemet
     
  14. Loewi_f

    Loewi_f

    Joined:
    Nov 13, 2019
    Posts:
    12
    I mean that ths position of UI element is in touch region
     
  15. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    The UI Element must be set in the Unity UI draw order to be in front of the touch region. This system is entirely Unity UI based and follows all the rules of how Unity UI works.

    The Touch Region cannot capture a touch if another UI element blocked and captured the touch. Unity UI's raycasting system prevents that.
     
  16. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    98
    Hey I have a player using some unique controllers and they aren't recognized on Win10, is there a way for this to be added to rewired or should I see if they can get them to emulate XInput controllers?

    [0] Joystick: eSwap PRO Controller Hardware Name: eSwap PRO Controller GUID: 00000000-0000-0000-0000-000000000000 Is Recognized: No Is Assigned: No

    [1] Joystick: SymProjects JC32 Hardware Name: SymProjects JC32 GUID: 00000000-0000-0000-0000-000000000000 Is Recognized: No Is Assigned: Yes

    [2] Joystick: TSS Handbrake Hardware Name: TSS Handbrake GUID: 00000000-0000-0000-0000-000000000000 Is Recognized: No Is Assigned: Yes
     
  17. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    All of these controllers can be handled through run time user mapping. These are exactly the types of controllers I would not add to Rewired for controller recognition. There is never going to be a point where all controllers are recognized. This is simply impossible for many reasons. Please read these:

    https://guavaman.com/projects/rewired/docs/FAQ.html#addding-controller-definitions
    https://guavaman.com/projects/rewired/docs/KnownIssues.html#increased-compile-play-time-editor

    This is the answer to your problem:

    Best Practices:
    https://guavaman.com/projects/rewired/docs/BestPractices.html

    Always provide some means for your users to remap their controls. Many controllers cannot ever be recognized by Rewired due to bad practices by manufacturers. To support these controllers properly and give your users the best experience, you must provide them a way to remap their controls. You can either include Control Mapper directly in your game or create your own control remapping system.

    -------------------

    No game should ever be released on desktop platforms that doesn't provide a way for users to map their controllers.
     
    Little_Gorilla likes this.
  18. Little_Gorilla

    Little_Gorilla

    Joined:
    Oct 11, 2013
    Posts:
    98
    Yep I agree it's realistic not to be able to have recognition for every map.

    I do have a custom controller rebinding screen that hasn't given me any problem for mapping controllers, but the player was saying that they're not able to rebind any of the controls, I will check for more info about this.
     
  19. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    155
    Hello, I am just trying to debug why my PS4 Controller Left Stick Horizontal Axis no longer functions - I will get back to this issue in another post at a later stage but was sure that it worked fine in all projects with Unity3d 2019.2.21 but in 2019.3.5 and 2019.3.7 it no longer works (everything else is still okay though). However, I was wondering if it is possible to somehow expose the font size in the DebugInformation Prefab as it is almost impossible to see the text to click anything on my iPad Air.
     
  20. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    I gather by your last line that you're having trouble with the DS4 on iOS. This is extremely important information to know if I am going to be able to help you solve a problem.

    This is the answer to your problem:
    https://guavaman.com/projects/rewir...#ios-tvos-13-gamepad-left-stick-x-not-working

    As for the font size, I will look into it. The entire system really needs to be replaced with a new one made in Unity UI.
     
  21. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    155
    Hey Guavaman, ahh that might explain it. I just did a test with a project backup in 2019.2.21 and it did indeed work fine. I am literally in the middle of a build using the Rewired version from 2019.2.21 but from the info you just provided it seems that would be pointless anyway so I will revert and test out the Xcode side of it.

    Regarding the Debug Prefab I went to look at the code to just see if I could change font size myself but it's part of a dll - hence my query.
     
  22. vvelasco

    vvelasco

    Joined:
    Sep 21, 2015
    Posts:
    23
    Hi Guavaman. Just letting you know Rewired has helped me a lot in adding button mapping to my game. I tried other tools and this is definitely the best. It made me redo the whole inputs of my game but it was worth it.

    Let me know if you can help me with this. I want to get the value input value of an action in order to show it in the tutorials. For example I'm looking for the action "JUMP" and I want to get the key assigned to it, for example "SPACE". In that way I can have dynamic tutorials depending on the key binding of the users.

    Thanks!
     
    Last edited: Apr 4, 2020
  23. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Thanks! I'm glad Rewired is working for you.

    Answer to your question:
    https://guavaman.com/projects/rewired/docs/HowTos.html#get-element-name-for-action
    https://guavaman.com/projects/rewired/docs/HowTos.html#display-glyph-for-action
     
  24. vvelasco

    vvelasco

    Joined:
    Sep 21, 2015
    Posts:
    23
  25. Djaydino

    Djaydino

    Joined:
    Aug 19, 2012
    Posts:
    41
    Hi.
    First off all i have to say that this is a great asset!

    I am using the control mapper, but i have some issues.
    i have 2 Categories set 1 for In Game Controls and 1 for UI.

    on the mapper i have set 1 map category (In Game Controls)

    on UI Category A and B are used for UISubmit and UICancel
    on In Game Controls A is jump and B roll

    When i set User Assignable Inactive on UI, i cant swap, only remove them.
    But when i remove i cant place them any more.

    When i set User Assignable active on UI i can swap but then the ui button is not working anymore.

    Should i use separate layouts for UI?
     
  26. Djaydino

    Djaydino

    Joined:
    Aug 19, 2012
    Posts:
    41
    I forgot to mention that i also Cleared PlayerPrefs Data several times (as when ui broke i had to)
    and updated to latest version today
     
  27. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    The RewiredStandaloneInputModule documentation gives you recommendations on how to deal with Unity UI:
    https://guavaman.com/projects/rewired/docs/RewiredStandaloneInputModule.html

    It is usually best to make separate UI and game controls, but it's up to you.

    You should not be able to remove or swap any Map Category that is set to non-user-assignable. And you should never be showing UI fields in Control Mapper for a non-user-assignable Map Category. It will cause drawing errors. A non-user-assignable Map Category is meant for locked controllers that can never be changed such as system controls (ESC to open a menu, etc.)
     
  28. Djaydino

    Djaydino

    Joined:
    Aug 19, 2012
    Posts:
    41
    Hi.
    Before i have ui in same category as In game controls so i moved them to ui category.
    i am not showing the ui buttons as well.

    but i think the way i moved them might have left some connections on the in game controls settings.

    Can i find/edit the file where these are set? as i don't want to redo all my controller settings :)

    I recorder my settings just to be sure if all settings are correct :



     
    Last edited: Apr 5, 2020
  29. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    You whole problem here is you have not properly configured conflict checking:
    https://guavaman.com/projects/rewired/docs/ControlMapper.html#conflict-checking

    Your UI maps which you are not showing to the user is set to conflict check against your other maps. You've set UI to non-user assignable, therefore they are protected.

    The information in the above link will solve your problem. A separate UI controller map set should be set to not conflict check against any non-UI map categories, and the opposite is also true -- no non-UI map categories should conflict check against UI map categories.
     
  30. Djaydino

    Djaydino

    Joined:
    Aug 19, 2012
    Posts:
    41
    Hi.
    I overlooked that one, thanks.
    Issue solved
     
  31. Skjalg

    Skjalg

    Joined:
    May 25, 2009
    Posts:
    161
    Do you know if there is an issue tracker for this? Unity seems to have fixed the first part of the problem but still left this part in..
     
    MatLoz likes this.
  32. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    Not sure what I am doing wrong, updated from 2018 to 2019,

    I moved from 2018, to 2019 with this update, and for some reason now when I am typing something in the Input text field, certain characters such as A, space, etc, will deselect the input field and not type in it, but other ones such as E, F, T etc will work... I even tried to deselect the "Ignore Input When App Not In Focus", but no difference

    Help
     
  33. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    You're going to have to be much more specific. I do not understand what scenario you are describing.

    What is "the Input text field." Are you talking about a field in the Unity editor outside the Game window or are you talking about a Unity UI field in the game or are you possibly talking about typing text in some window outside Unity (and if that's the case, is this in a build or in the editor?) Your message is confusing because I can't even imagine why changing "Ignore Input When App Not In Focus" would make any difference to what you are describing.

    What version of Unity 2019 are you using?
    What version of Rewired is this? Did you update Rewired from 2018 to 2019?
    What platform is this?
     
  34. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    Sorry,

    Unity 2019.3.6f1
    R 1.1.32

    I installed this project fresh in 2019, just imported some of my old stuff like scenes etc from the 2018 project

    Windows platform,

    The input field I talk about is the Unity UI (Currently as text mesh pro input field) I press play as usual and type in the text field, (worked in 2018)

    So some keywords work no problem, others like described above i believe remove focus from the text input field.

    If I disable the Rewired Input Manager game object, it works properly, so something with the input manager?
     
  35. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Thanks.

    The Rewired Input Manager doesn't do anything with regard to Unity UI. The core of Rewired has no awareness of Unity UI whatsoever.

    The only component of Rewired that interacts with Unity UI in any way is the RewiredStandaloneInputModule:
    https://guavaman.com/projects/rewired/docs/RewiredStandaloneInputModule.html

    This input module is required to make Rewired work with the Unity EventSystem, which in turn is what is responsible for sending events to UI elements.

    With a properly-configured RewiredStandaloneInputModule and an EventSystem in the scene, Rewired's input, as you have configured it, is used to create UI events that are responsible for navigating the UI. This includes navigation events (move up, down, left, right), submit, and cancel.

    What you are describing sounds like you have the UI navigation keys bound to A, space, etc. and that navigation is taking place when you press one of these keys in the Input Field. This should not be happening. If this is happening, this is not Rewired doing it, because Rewired does nothing but send events through the Event System. It's up to the control itself (the UI Input Field) to determine what to do with a navigation event it receives from the current Input Module. If it receives an event that tells it to navigate in a direction, it has to decide whether or not to obey that event. An Input Field should not be responding to navigation events from key presses.

    Disabling the Rewired Input Manager in the scene may look like it solves your problem, but that's only because with Rewired disabled, the RewiredStandaloneInputModule is no longer sending any events at all. If you really want to test this and see if there's any difference between Rewired's behavior and Unity's, you have to remove the RewiredStandaloneInputModule from the Event System, add the StandaloneInputModule to it, then configure the navigation Actions to use those same keys you had bound before in Unity's input manager.

    The problem here is not Rewired. It's something on the Unity UI / Text Mesh Pro side of things or some other script that is reading input and changing the selected UI element.
     
    Last edited: Apr 7, 2020
  36. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    Thank you for the swift responses,

    Here's what I discovered, using the Standalone Input it works,

    Checking the "Force Module Active" on the rewired input, makes it work as well.
     
  37. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Do you have multiple Input Modules in your scene or on your Event System? Force Module Active is not necessary if things are set up correctly.
     
  38. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    So sorry for taking you through all this, yes that is the issue, I found out another asset auto spawned its own Event System as well, disabling that one allows yours to work properly as it should.

    Thank you for your help truly appreciated.

    My next question now is, in the 2018 project I had the Sensitivity for the mouse show up in the Control mapper, but in this one it is not there. Is there a simple way of having it pop up as well when the Control mapper is opened?
     
  39. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    There's no way Sensitivity should just disappear when you move to Unity 2019. The Control Mapper data is 100% identical on both. Check the Control Mapper inspector:
    https://guavaman.com/projects/rewired/docs/ControlMapper.html#inspector-input-behaviors

    Show Input Behavior Settings must be checked.
    You must also have correctly configured the Input Behaviors you want to show.
     
  40. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    425
    hey @guavaman and @Benzor,

    We're still using 2019.2.17 so didn't hit the analog stick problem, sorry.

    I was testing 2019.3.8 today and hit the iOS/tvOS analog stick problem. The original menu button problem introduced in 2019.2.18 was fixed but their pause button handling for iOS 13 does indeed appear to overwrite the left analog stick data.

    (In iPhoneSensors.mm Line 593, ReportJoystickButton BTN_PAUSE will overwrite the analog stick data from Line 564 UnitySetJoystickPosition because they both set joystick pos num=0).

    In case no one already has (I could not find anything) I just filed the bug Case #1235161.
     
    Skjalg likes this.
  41. Skjalg

    Skjalg

    Joined:
    May 25, 2009
    Posts:
    161
    Great. Please let us know what the answer is when you hear back from them
     
  42. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    Thank you,

    I ran the installation of rewired again, and now it seems to be back to normal =)

    Awesome asset
     
  43. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
  44. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    Hello,

    Another thing, I am liking the DefaultTheme option, and have modified it to my specifications. However I am missing the Text settings for Character Spacing Options not just Line Spacing.
    Can this be implemented please?

    They are too tight together at the moment with the font I have and they need it for sure.

    Thank you
     
  45. virgiliu

    virgiliu

    Joined:
    Apr 4, 2015
    Posts:
    42
    Hi. I followed the steps from "How to temporarily remove Controller definitions to speed up development": I copied the ControllerDataFile outside of the Rewired folder (to Assets/TestData), I removed almost all controller definitions leaving only Xbox and Steam controllers, and I linked the new controller data file in the Rewired Input Manager. But still I am getting slowdown during development, about 10 seconds when I press Play, and even in a build that has just an empty scene.

    After that I removed the HardwareMaps that I am not using, in an attempt to speed up development, but still I am getting about 10 second delay in play time. If I remove RewiredInputManager from the scene, the time it takes to play the scene is less than 2 seconds.

    Am I doing something wrong?

    This is in Unity 2019.3.1f1 with Rewired 1.1.32.0
     
  46. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    There is no way Rewired would ever cause a 10 second load time. Max is 3-4 and that's only with all the controller definitions on a slower machine. Something is definitely wrong, but I don't know what to tell you. Unity is constantly changing and causing new problems as they add all kinds of new features, options, experimental stuff, etc. There are no other reports of anything like this and I cannot reproduce a problem.

    And if you're talking about a build, there has never been a slowdown in builds. That guidance about removing controller definitions is exclusively for the Unity editor. Builds load the serialized data almost instantly.

    Is this an IL2CPP build by any chance? Major problems in IL2CPP caused by Visual Studio 2019 16.5 update:
    https://forum.unity.com/threads/neverending-il2cpp-build.855235/

    Update: [edited -- removed information about Mono. Mono appears to work correctly.]
    I'm getting more and more errors reported in IL2CPP. It seems the the forever hang (or very long hang, which is probably what you're seeing) is caused by a Visual Studio 2019 16.5.x update. Removing it and downgrading to 2017 works in all cases to resolve all issues on IL2CPP builds. This is a major error by Microsoft. Until this is resolved, the only recommendation I have is to uninstall Visual Studio 2019 and install Visual Studio 2017. (Uninstalling 2019 is required because Unity will use whatever newest version it finds to compile.) To be clear, Visual Studio 2019 16.4.x has no known issues. The compiler bug appears to have been introduced in 16.5. This has been tested to fail up to 2019 16.5.3 (current version).
     
    Last edited: Apr 9, 2020
  47. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Control Mapper for Text Mesh Pro, which is what you have to be talking about because no such option exists in Unity Text, is a new variant of Control Mapper which was a direct port of the original modified to use TMP. Text Mesh Pro adds literally dozens of possible text styling options, and what options it offers probably varies by TMP version. I don't have any desire to add every single option Text Mesh Pro offers to the theming system, nor keep track of version-specific options. I'm going to have to rip this apart and come up with a better way of doing it because I do not want to be maintaining that list of TMP options as things evolve. I don't know what that looks like at this point.
     
    Last edited: Apr 9, 2020
  48. vvelasco

    vvelasco

    Joined:
    Sep 21, 2015
    Posts:
    23
    Hi Guavaman.
    I implemented the Control Mapper on our game. However we noticed a couple of small errors.

    CANCEL BUTTON MAPPING
    When we use an Xbox gamepad, the B button is the UICancel button, but it's also the PUNCH button.
    I set up the Universal Cancel Action (UICancel).
    However If I try to use B for any action, the menu is closed because it takes it as a cancel button on the mapping screen. Is it possible to not have the Cancel Action on the mapping screen?

    SUBMIT BUTTON MAPPING
    In our game, A is for JUMP and UISubmit. However, if on the gamepad we remap the JUMP action. I cannot use UISubmit again. This error only happens on the gamepad. On keyboard it works fine.
    UICancel and UISubmit are in Map where the User Assignable was unchecked.
    You can see in this video how when I reassign A to any other action. Submit disappears.


    I noticed that the problem is that when it shows there's an Assignment Conflict, it means there's a conflict with UISubmit. Is there any way to not being able to reassign a button? Just because it's a UI button.

    EDIT: If I can only remove the "REPLACE" button from the assignment conflict menu, it would be a good temporary solution.




    Thanks!

    EDIT 2: I don't know exactly what I configured but now the Assignment Conflict prompt doesn't show up. For the UICancel I only had to select Screen Close for the cancel button. The universal option made the B button impossible to map. I actually read that in the documentation so it's on me

    This solved all the issues. Thanks
     
    Last edited: Apr 10, 2020
  49. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,200
    Assignment conflict checking must be configured per Controller Map Category:
    https://guavaman.com/projects/rewired/docs/ControlMapper.html#conflict-checking
     
  50. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    247
    Is there anyway for me to temporary edit some file to allow for character spacing in the theme?

    What is the other alternative option to have the menu custom
     
unityunity