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. fairchild670

    fairchild670

    Joined:
    Dec 3, 2012
    Posts:
    62
    Thank you so much!! That did the trick, works brilliantly!
     
  2. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    205
    Guavaman,
    Any idea or workaround?
    2019.3 with rewired Cinemachine added to the camera.
    The right stick is set to rotate the camera.
    It does it just fine but ONLY when the Editor Settings is not using the Experimental Editor Play Mode option.
    I am not certain but I also believe the camera wont rotate on a build executable.

    Thanks for any input.
     
  3. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    I would suggest you discover where it's being disabled, etc. without just adding ReInput.userDataStore.Load. It's unnecessary under normal circumstances. Disabling and enabling the Rewired Input Manager is also expensive in terms of garbage generation.
     
  4. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    If you are referring to this experimental editor Play mode options, see this:
    https://guavaman.com/projects/rewir...ng.html#unity-alpha-beta-preview-experimental

    This option is not supported by Rewired. Huge changes have to be made to the system to make these new experimental Unity editor options work. I am not going to make these complex changes to Rewired while things are experimental, preview, or beta. The editor is constantly-changing and is extremely difficult and time consuming to continually have to rewrite the same code over and over to work with every new feature they design. Doing so when in an experimental state is not feasible as I will have to be changing it constantly as they made changes and refinements to their features, getting bug reports from users every time they make some change that breaks the system. If the foundation is unstable, building on top of it is a very bad idea.

    If it's not working in a build, use Debug Information to figure out why:
    https://guavaman.com/projects/rewir...l#debug-information-diagnosing-input-problems
     
    shotoutgames likes this.
  5. shotoutgames

    shotoutgames

    Joined:
    Dec 29, 2013
    Posts:
    205
    Thanks, I understand that well. I just wasn't sure if you had may have had any insight on what may cause these issues. Not expecting a fix when it's not broken.
     
  6. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    The link I posted is the single most important tool for figuring out why anything isn't working. It will help you find the cause:
    https://guavaman.com/projects/rewir...l#debug-information-diagnosing-input-problems

    Note that it won't help you make things work using Unity's experimental editor modes, but if you're having a problem in a build that is not present in the editor, it is the tool to use.
     
    Last edited: Jan 11, 2020
    shotoutgames likes this.
  7. ink13

    ink13

    Joined:
    Nov 14, 2013
    Posts:
    18

    Hey, thanks for taking the time to respond. Ended up just doing it all manually via the inputs as well. Unsure if i couldn't just figure out your system or not or if i'd gone wrong somewhere.
    Irregardless, things have moved along. Thanks a bunch for the support.
     
  8. CurryKitten

    CurryKitten

    Joined:
    Dec 22, 2016
    Posts:
    13
    I've just watched your YouTube video about how to create custom controller definitions - which was useful, however.... my players seem to have a collection of the weirdest and unheard of controllers ever and I'm still (inevitably) getting a bunch that I can't seem to do much with.

    A common theme here is the controller being misrecognised as having the wrong number of sticks/axis/buttons/hats etc. One of the more modern controllers, and one that many people use has 2 sticks &16 axis, but is detected as having 1 stick, 8 axis and 24 buttons. I can work around some of the problems this has created by ensuring people use the first 8 axis and I ignore buttons.

    Some other controllers seem to be coming up with less than 4 axis (they do actually have that many) and I can't work with less than 4. Am I right in thinking I'm a bit screwed here, this is the HID report that is wrong? Essentially I want to tell rewired: "that button isn't a button, it's an axis can you treat it as one"
     
  9. Hyperg

    Hyperg

    Joined:
    Jul 6, 2015
    Posts:
    18
    Hello, we're currently migrating our game project from 2017 LTS to 2018 LTS (2018.4.14f1) and while upgrading Rewired to the appropriate version (1.1.29.4 U2018), I've discovered a weird issue:

    We have a system that detects the last active input type (Kbd, Mouse, Controller) and notifies some game managers whenever that changes (to switch glyphs, etc). This is done with the LastActiveController delegate from ReInput.controllers. One of the operations performed by this system is to hide the mouse cursor, whenever the player does not use it and the UI manager deems it appropriate.

    This works well for our currently shipped version (the early access version uses Unity 2017.4.25f1 and Rewired 1.1.25.2), however the 2018 build does not seem to fire any changes to the last input controller type, whenever Cursor.visible is set to false. In other words, once the user has switched away from the mouse, the system does not detect it back whenever the mouse is moved or a button clicked.

    Any thoughts?


    UPDATE: Apparently, the mouse activity is completely dead for the fullscreen standalone application, regardless of the cursor visibility. Setting NativeMouseHandling to false in Rewired input manager prefab (for PlatformSettings->Windows) fixes the issue. I think this warrants some investigation...
     
    Last edited: Jan 13, 2020
  10. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    I suggest you don't make controller definitions for every controller you find in the wild. There's no reason to and plenty of reasons not to. Most controllers should work by runtime user mapping, provided you give the users a way to do so.

    There's no way to tell Rewired to treat controller elements differently than the HID descriptor describes. If it shows up as having 24 buttons, then the HID descriptor told it it has 24 buttons. What controller is this and is it designed for use on PCs? Rewired does support pressure-sensitive buttons on Raw Input, so if these buttons are providing that information, it will be available through GetAxis. If the axes are truly showing up as digital buttons in the HID report, then there's no way to fix it and you will not be able to get any analog values from these elements from the device without a driver.
     
    Last edited: Jan 13, 2020
  11. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    Did you happen to enable Unity's new input system backend? Check that it did not get automatically enabled.

    https://guavaman.com/projects/rewired/docs/KnownIssues.html#not-compatible-unity-new-input-system

    Please send a picture of your "Resolution and Presentation" Unity Player settings.
     
    Last edited: Jan 13, 2020
  12. Hyperg

    Hyperg

    Joined:
    Jul 6, 2015
    Posts:
    18
    Thank you for the quick response!

    I've checked the input settings too in search for a fix, but it is indeed set to InputManager, not the new system (or the "Both" setting).

    I'll check for the graphics settings first thing tomorrow (I assume you're referring to the "Resolution and Presentation" section from the player, or are there any other settings that might affect this issue..?)
     
  13. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    Thanks. I have tried every combination I can of all the Resolution and Presentation settings and cannot reproduce any issue in Unity 2018.4.15f1 in windowed of full screen mode in builds.

    This is probably going to end up being one of those "perfect storm" scenarios where you have some specific settings, are doing some specific process while launching the application, have some native plugins installed that are affecting it, and/or modifying some Unity setting at runtime that is triggering a series of changes to the window system and/or Raw Input. Every one of these scenarios I mentioned have happened in the past. Examples:

    1. There have been problems in the past in Fullscreen Exclusive mode when Unity 2018 first came out which were resolved.
    2. In the past, some user clicking out of the game window while the splash screen logo was being displayed caused an issue with window handle detection breaking mouse input.
    3. Native plugins that hook the wndproc or register for Raw Input devices.
    4. Changing certain graphics settings like VSync at runtime has broken it before.

    The first step in tracking it down would be to create a new project, install Rewired, and make a build. Rewired/DevTools/DebugInformation) can be used. Open Controllers -> Mouse -> Axes and if the numbers don't change, it's broken. The fact that the pointer moves around and can click on the GUI elements doesn't tell you anything because that's all windows/Unity. Similarly, the absolute X/Y pixel position shown in Debug Information is coming from Unity. Only the X/Y axes delta value in Debug Information is coming from Raw Input.
     
  14. Hyperg

    Hyperg

    Joined:
    Jul 6, 2015
    Posts:
    18
    Thanks again for looking into this. I'll try to strip stuff away from our initialization process (I've already dug this trench a lot, even discarded the UI notifications altogether only to see if the LastActiveController delegate fires alone...unfortunately unsuccessful).

    As for other plugins, safe for some minor shading stuff and Photon Bolt for our network framework, we don't use shady contraptions (and Bolt is not initialized, unless the player triggers multiplayer game modes). As far as i know, Rewired is king in the castle, input-wise. We did use TextMeshPro and PostProcessing stack which i've removed as project assets, to be replaced with the package versions.

    I'll try the new project debug too, if only to identify the proverbial nail in the coffin xD
     
  15. Microck

    Microck

    Joined:
    Oct 6, 2015
    Posts:
    1
    Hello !
    I have a simple question.
    I use playmaker (I'm not a programmer) and Rewired.
    How can i open and close the controlMapper ? Is there any playmakers actions to do that ?
     
  16. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    I'm glad you were able to distill this down to a mouse registration issue. I'm sure that took some time to do, but it's very helpful.

    The first step of trying a new project is the biggest brush stroke possible to identify the issue. If that actually has a problem, then it will be much easier to determine what the cause is because there won't be any extraneous stuff in the project to wonder about. If it doesn't, then we'd know some setting or code in the project is causing it, then we can go from there to figure out exactly what. If necessary and if it's not too difficult, I would be willing to take a look at a build of the project to see if I can reproduce it on my end. If so, a mono build would work great because I could replace the Rewired libraries with debug versions of them and find the cause easier.
     
  17. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    No. Control Mapper is an optional package. There are no PlayMaker Actions for the various optional Rewired packages. Each package would have to come with its own PlayMaker Actions because the project would not even compile if PlayMaker Actions were included for packages that are not installed.

    Look at the example scene that comes with Control Mapper: Rewired/Extras/ControlMapper/Examples/ControlMapperDemo

    You can see that ControlMapper.Open is called simply by using the OnClick event on a button in the inspector.
     
    Last edited: Jan 14, 2020
  18. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    34
    Hey guys, so i'm trying to get vibration to work on stadia controller on windows/mac platform. Here is my code for vibration. It worked fine with my PS4 controller tho when i try to get the vibrator of my stadia controller it returns null. P.s. I used this code to test vibrate both controller, my ps4 controller vibrated but not my stadia controller.

    Code (CSharp):
    1. foreach(Joystick j in rePlayer.controllers.Joysticks) {
    2.     IControllerVibrator vibrator = j.GetExtension<IControllerVibrator>();
    3.     if(vibrator == null) continue;
    4.         ControllerVibrator = vibrator;
    5. }
    6. if (ControllerVibrator == null){
    7.     Debug.Log("Null vibrator");
    8. }
    9.  
    Any sugguestions would be appreciated, thank you.
     
  19. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    https://guavaman.com/projects/rewired/docs/FAQ.html#force-feedback

    The Stadia Controller does not support vibration on any build target except Stadia.
     
    libra34567 likes this.
  20. ricardo_unity616

    ricardo_unity616

    Joined:
    Nov 29, 2018
    Posts:
    1
    Heya guys, I have a question and it kindof necros an old post in this thread, I apologize in advance for that.

    To explain briefly, the issue that I'm currently experiencing is while pressing down an input on the numpad, I send the correct input event down. But if I hold shift and release the numpad input, the numpad event up is returned in an alternated state ex: input down = 4, input up = left arrow.

    Currently using version: 1.1.27.3.U2018

    Was there an updated version that wrapped a solution around this problem or is this still something that will require some additive input logic?

    Thanks!
     
  21. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    There is no solution for this. The problem lies at the Windows level along with the way the application interprets key events reported by Windows. If you analyze what Unity does with these key combinations, you will see various keys get stuck on permanently when pressing and releasing shift in various order of the keypad keys. (Press shift AFTER pressing the numpad key, then release the numpad key, then release Shift. The number key will be stuck on forever.) The reason for this is that Windows is changing the key being sent to the application based on whether shift is held to make these keys act as arrow keys or as number keys. It is not sending an up event for the number key when you press shift and the already-held key becomes an arrow key, nor is sending a number key up event when you release the number key when it's acting as an arrow key because it is shifted. In order for Rewired's native keyboard system to maintain 1:1 compatibility with Unity's key system and how it handles the location of keys on all keyboard layouts, the same method of interpreting key events is used (with some special exceptions). This makes it impossible to make these number pad keys work correctly when the user is shifting and releasing in odd order. There is no fix possible I know of that wouldn't completely redefine how VKey events are interpreted causing huge breaking changes across likely all non-us key layouts.
     
    Last edited: Jan 22, 2020
  22. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    540
    Hi,

    Just a quick question about the expected behavior with GetAnyButton. The documentation states "Gets the button held state of all Actions. This will return TRUE as long as any button is held. This also applies to axes."

    My question is the first sentence states that it gets the held state of all Actions but the second says any button. So, if I do not have Action Bottom Row 2 mapped to any action for example, and I press said button, should it return True for AnyButtonDown, or not?

    Thanks!
     
  23. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    >> Just a quick question about the expected behavior with GetAnyButton.

    First of all, it should be clarified that you are talking about Player.GetAnyButton. There is also Controller.GetAnyButton which is completely different. I have inferred from the text of your message that you are referring to Player.GetAnyButton.

    Actions can be queried for both Axis value (floating point value) and Button value (boolean value).

    >> Gets the button held state of all Actions.

    This is exactly what it does.

    >> This will return TRUE as long as any button is held.

    It is not explicitly spelled out in this sentence that this means the Button State of the Action. I assumed you would infer this from the previous sentence. It is easier to refer to "buttons state of the Action" as a "button" than to continually repeat that phrase. Even the name of the functions Player.GetButton, Player.GetAnyButton, etc. use the simplified form of referring to the "button state of the Action" as simply "button."

    >> So, if I do not have Action Bottom Row 2 mapped to any action for example, and I press said button, should it return
    >> True for AnyButtonDown, or not?

    No Action will ever return any value other than 0 if it is not mapped to an Action and the underlying mapped element source returns a non-zero value.

    ALL Player functions related to input act on and return Action values, not controller element values. That's the entire purpose of the Player class. It is a controller-shaped interface that presents Actions to the user which are calculated from all the underlying Controller Maps and Controllers contained by the Player.
     
    Last edited: Jan 25, 2020
  24. MudPuppet

    MudPuppet

    Joined:
    Aug 10, 2012
    Posts:
    155
    Hey Necka, I too would like to see a TopDown Engine integration package especially when there is very little that would need to be done to implement one as both the Corgi/TopDown Engines use the exact same stuff (controls/tools/inventory) etc.

    Regardless, I just had a bit of success just converting the Corgi one to TDE. First off I must say that the Corgi integration package pretty much worked fine in TDE v1.5.1. but in TDE v 1.6.2 I had to do the following...

    1. Install Corgi Integration Package following Rewired docs on the subject. You will notice some stuff missing from the Corgi Integration menus (in Unity3d) so won't be able to implement it properly straight away.
    2. Open all of the integration scripts and do a Find/Replace from "Corgi" to "TopDown".
    3. For any 'InformationAttribute' errors I just changed from the old InformationAttribute to MMInformationAttribute but still got errors on those lines of code so just commented them out - no real problems there as I can always refer to a vanilla project for TDE,
    4. Go through the Corgi Integration process again and you will notice it is all now under TDE in the menus and all parts are now showing.
    5. I had to manually drop the 'corgi demo' Touch Controller into the UICamera/Canvas but be sure to add the 'Canvas Group' component to Joystick, Buttons, and Arrows before dropping them into the Inspector slots in the GUIManager component.

    This seems to work pretty much okay. I am targeting mobile so the mobile controls worked and the Rewired 'standard' gamepad settings worked on my PS4 controller. I can't say much about the Inventory Engine side of things as years after release I still have not really touched it but it did work with the gamepad.

    NOTE: I recently had Tony from the Dialogue System asset help me implement Rewired better with Corgi so the same setup stuff should also apply to TDE.

    https://www.pixelcrushers.com/phpbb/viewtopic.php?f=3&t=2850&sid=2f151a005f1613cac2ccd840e8548d25

    GUAVAMAN: Awesome product mate! I only got it the other day to replace my existing Control Freak 2 asset in all projects. So far I am getting around any noob issues without too much drama. I do have a few questions but will hunt through the docs/forum a bit to see what I can find out.
     
    Lightrail and Necka_ like this.
  25. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    438
    Hey thanks a lot for that, as soon as I have some time I'll try this out but it sounds like there should be no issue as you explained
     
  26. daven8989

    daven8989

    Joined:
    Jan 25, 2014
    Posts:
    27
    Dear guavaman,
    is there a way to turn off a controller by code? In particular I would like to turn off a ps4 controller by code when a specific minigame inside my application end(that require a ps4 controller to be played).The minigame is played by 6 people,and required 6 ps4 devices. The next minigame inside my application needs to be played using 4 bluetooth custom buttons (and the maximum number of simultanously devices connect in the bluetooth standard is only 7 devices). So I would like, at the end of the first minigame, to turn off the 6 ps4 controllers, so the users doesn't need to turning of them manually, but they only need to connect the 4 other bluetooth buttons.
     
  27. devotid

    devotid

    Joined:
    Nov 14, 2011
    Posts:
    419
    Thought I would chime in here.

    You can definitely open the input mapper with playmaker. I have been doing it for 6 years. lol

    Drag the Control Mapper script component into the state and then select "Call method" from the drop down. (Or just use the Call Method Event from the actions list) Then select Void Open {}. This will instantly open the input mapper. You can then close it by using an action you have defined in the inspector.

    I just tested it to make sure and it works fine.

    Guavaman is correct though. (and offers the best support around btw) There is no actual "playmaker action" for opening and closing it.... but you can do just about anything in playmaker with default Get Property or Set property actions. In this case you can call the Open or Close Method with the "Call Method" action.

    Good Luck. :)

    Vive La Playmaker!!!!

    Kevin
     
    Last edited: Jan 27, 2020
    guavaman likes this.
  28. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    No. Rewired cannot disconnect devices.
     
  29. voncarp

    voncarp

    Joined:
    Jan 3, 2012
    Posts:
    181
    Hi,

    Where would I need to start in getting Rewired setup for Sony Move Motion controller?
     
  30. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
  31. mgregoirelds

    mgregoirelds

    Joined:
    Feb 3, 2017
    Posts:
    20
    Hello, I do have a question for you about my Rewired usage. I'm using the Rewired Standalone Input Module to control UI navigation. I have a case where, in my UI, I have a button that when I press left or right on either the DPad or Analog, it switches the button label to the previous or next associated data (e.g. I have a list of three languages ['EN', 'FR', 'JA'] and when FR is displayed, pressing left switches to 'EN' while pressing right switches to 'JA').

    I am querying GetAxis in the Update method of a component attached to the button and I'm doing the switch manually depending whether the returned value of GetAxis. However, it is really really fast and pressing on the left DPad switches the label quite a few times. Is there any way of handling this behaviour other than using a timer within my component to stop reading GetAxis for 'x' milliseconds upon a reading value != 0?
     
  32. trev-nagel

    trev-nagel

    Joined:
    Oct 2, 2019
    Posts:
    5
    Hi, have you come across any issues regards Unity 2019.2.18 changing the behaviour of the
    UnityEngine.Apple.TV.Remote.allowExitToHome
    flag or Unity UI event handling on Apple TV?
     
    Last edited: Jan 28, 2020
  33. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    427
    @guavaman in case it helps, there was a tvOS exitToHome issue fixed in Unity 2019.2.11 and everything worked fine up until 2019.2.17;
    https://issuetracker.unity3d.com/is...dot-remote-dot-allowexittohome-is-set-to-true

    Then there was a game controller change for iOS in Unity 2019.2.18, where the Unity UI and game controller input seems to have broken for us on tvOS;
    https://issuetracker.unity3d.com/is...doesnt-work-on-xbox-one-and-ps4-controllers-1
     
    guavaman likes this.
  34. mgregoirelds

    mgregoirelds

    Joined:
    Feb 3, 2017
    Posts:
    20
    I fixed my issue. I created two new actions, SwipeLeft and SwipeRight as Button, then in my Joystick Maps, I did set the Element to Left Stick X as Axis Range negative for Left and positive for Right. Work like a charm!
     
    guavaman likes this.
  35. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    Thanks for the information. Apparently in 2019.3.0f5 the Pause button doesn't work anymore in iOS/tvOS on at least Dual Shock 4, but probably all controllers according to a customer. It now returns Axis 18 instead of Button 0 as it should according to Unity's docs. So yeah, lots of problems with UnityEngine.Input since iOS13. Rewired is dependent upon it on iOS/tvOS, so it inherits the problems.
     
  36. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    Unity UI should work exactly the same on all platforms. The code is not platform-dependent. You can see it here:
    https://bitbucket.org/Unity-Technologies/ui/src
     
  37. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    34
    Hi Sir, thank you answering my question :D. I recently also test those codes on PC and xbox one controller, unfortunately, it shows the same result. Is there anything i did wrong here? Thank you in advance!
     
  38. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    427
    If Unity have changed the axis number that the menu button is reported on in 2019.2.18+ I assume this might also affect their own internal handling of detecting the menu button which would break exitToHome returning to the dashboard on tvOS and the menu / pause button generally on iOS and tvOS.

    Unity QA replied to me saying they have not detected a regression with this problem but it's certainly not working for us at the moment. The last working version for us is Unity 2019.2.17.

    Are you working on a fix for this stuff at the moment, and if so, what would the turnaround time be? Thanks for any info.
     
  39. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    Vibration on Windows require that you use XInput. "Use XInput" must be enabled in Rewired Editor -> Settings -> Windows. The controller you are using must be XInput-compatible.
     
  40. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    No. It is not my policy to wrap newly introduced low-level Unity bugs in order to "fix" them, only to have them fix their own bug at some point breaking my wrapper.

    I have no plans to fix any of these issues because the only proper way to do so would be to drop the UnityEngine.Input dependency and implement my own native libraries on iOS and tvOS. I won't be doing that in the short term.
     
  41. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    427
    Ok, thanks for the info. I think our only option is to revert back to older Unity 2019.2.17.
     
  42. trev-nagel

    trev-nagel

    Joined:
    Oct 2, 2019
    Posts:
    5
    @guavaman FYI I made a test scene using the Rewired debug tool and in Unity 2019.2.19 using the latest version of Rewired the Siri Remote's menu button returns Button19, whereas in 2019.2.17 it returns Button0.
     
  43. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    That's bad to hear they introduced this bug in a minor update, not even the 2019.3 update. Please report it to Unity.
     
    trev-nagel likes this.
  44. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    427
    Yep done - bug reported yesterday: Case #1214948.

    Update: Accepted as a bug and will be sent off for fixing.
     
    Last edited: Jan 29, 2020
    Benzor and guavaman like this.
  45. Driiade

    Driiade

    Joined:
    Nov 21, 2017
    Posts:
    72
    Hello, we bought Rewired to support various controller on TVOS. What is the plan for supporting PS4 + Xbox controller on TVOS ?
     
  46. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    There is documentation on this:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#ios-xbox-ps4-controllers

    This and several other issues have made it clear that replacing UnityEngine.Input with a native library of my own is important for problem-free controller support on iOS. However, there are no concrete short-term plans to do this at the moment.
     
    Last edited: Jan 30, 2020
  47. Driiade

    Driiade

    Joined:
    Nov 21, 2017
    Posts:
    72
    Hello.
    Yes but... we really need this in short time :/

    Actually we can't play on tvos with rather xbox , ps4 or steelseries.
    We modified auto assignment for controller on tvos, because siri remote and steelseries seems to be connected with player 1 and player 2 respectively. So tomorrow we will check this.

    But... we need xbox and ps4, and we don't have your experience for controller. We bought plugins for this :/

    Thank you for the short answer.
     
  48. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    The documentation I linked to states:
    These controllers DO work already with no changes in Rewired.

    This is true.

    Your problems are almost certainly due to other issues like controller assignment. Figure out exactly what is happening using the tools provided:
    https://guavaman.com/projects/rewired/docs/Troubleshooting.html#debug-information

    There is a 100% fully functional free trial on the website which you can download to evaluate before you purchase to see if it does what you need. Everyone who is considering buying the software should always download the free trial to evaluate it before purchase.
     
    Last edited: Jan 31, 2020
  49. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    34
    Thank you for your prompt reply

    Thank you for the reply, I tried enabling XInput, removed my XboxOne map, and added [Gamepada Template]. My xboxOne controller can still control, but still can't get the Vibrator. Should i use XboxOneGamepadExtension? Or did i miss something. Thank you. Best
     
  50. guavaman

    guavaman

    Joined:
    Nov 20, 2009
    Posts:
    4,232
    I had to go back to your original message to understand what you're doing:

    Code (csharp):
    1. foreach(Joystick j in rePlayer.controllers.Joysticks) {
    2.      IControllerVibrator vibrator = j.GetExtension<IControllerVibrator>();
    3.      if(vibrator == null) continue;
    4.      ControllerVibrator = vibrator;
    5. }
    6.  
    7. if (ControllerVibrator == null){
    8.     Debug.Log("Null vibrator");
    9. }
    XInput devices on Windows do not have any sort of Controller Extension. Controller Extensions only exist for "special" controllers that have functionality that cannot be accessed via the standard Controller API. This is mostly used only on console platforms, with the exception of two controllers on Windows:
    https://guavaman.com/projects/rewired/docs/api-reference/html/N_Rewired_ControllerExtensions.htm

    See the documentation on how to properly handle vibration in a controller-agnostic manner:
    https://guavaman.com/projects/rewired/docs/HowTos.html#Vibration-Rumble

    The only reason you would ever need to use a Controller Extension for vibration is if the controller supports a different vibration API than the default one.
     
unityunity