Search Unity

Input System Update

Discussion in 'New Input System' started by Rene-Damm, Dec 12, 2017.

  1. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    4,428
    It's got issues, true. It's not got nearly as many issues as the old input system. It's also going to get better. So any new project should probably use the new input system, for their own sanity.
     
  2. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,474
    Well they already jumped to 1.0 skipping past multiple versions that were expected to have other features, so dropping 'preview' doesn't make 1.0 sound any more complete either when some of us know that 1.0 was originally meant to have included. I'm like whatever I tried it not sure I'm ready to convert over to using it yet, besides still so many other assets that are using the old system aswel.
     
  3. Osteel

    Osteel

    Joined:
    Jan 17, 2014
    Posts:
    43
    Hi!

    We're currently working on a small project for an interactive booth which will make use of a flightstick for control and we purchased the Thrustmaster USB Joystick because of its minimalist look. However, it isn't being detected when listening in the InputActions.

    Few things to note:

    1. The device is being picked up by windows and works with online testers
    2. The device is listed as Unsupported in the Input Debugger
    3. Adding the device to the Input System Package under Supported Devices does nothing

    From reading online, it looks like its possible to create a custom input device, but I'm not sure exactly how to go about that from reading the documentation. For example, where does the existing JSON exist in which you can modify to add your own devices? etc.
    https://docs.unity3d.com/Packages/c...nual/HowDoI.html#create-my-own-custom-devices

    Any help would be greatly appreciated! :D
     
    GliderGuy likes this.
  4. Deozaan

    Deozaan

    Joined:
    Oct 27, 2010
    Posts:
    615
    Is there some kind of public roadmap showing which features are expected to be included in 1.0 and other features planned for post-1.0, including a relative timeline for when these features will be released?

    Note that for the timeline I'm not necessarily asking for specific dates. But rather something that will give me a general idea of when to expect a feature based on the current status of the project at any given time. In other words, something like: features X, Y, and Z are expected in 1.0. Features J and K are coming in 1.1. Feature L is coming in 1.2. Feature N is planned for 2.0. etc.

    The current Unity roadmap isn't helpful (or up to date) and as I recall, the roadmap video from Unite didn't go into details on the information I'm asking about.
     
    Last edited: Nov 8, 2019
  5. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    371
    I'm finally on a project that is going to be in development through next year, but it will likely not upgrade to Unity 2020. With all of the delays, it looks like this package is very close to release (congrats). However, with how long it is taking, could you confirm that the current plan is to continue to support 2019.x releases. Or is the first version out of preview going to be for 2020.1?
     
  6. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    939
    2020.1 will be the first one out of preview. We want however to support the 2019 LTS as best as we can. Since we are a package that it easier to do. LTS versions have however a higher threshold for accepting Unity fixes that we might have to do at some point but don't foresee any problem in that regard.
     
  7. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    371
    I'm a bit disappointed with the response, but thank you for the updated information! I am extremely apprehensive about putting the project through a tech release schedule, but we'll see. Good luck with the release there seems to be a lot of good stuff in here (in particular input contexts and input control modes).
     
  8. XXXX-XXXX

    XXXX-XXXX

    Joined:
    Jan 23, 2014
    Posts:
    29
    Are you going to be adding values to the InputValue class? The doc says it's a wrapper for CallbackContext, but the only functionality I can wring out of it thus far is isPressed. I'm using a layer of virtual inputs meant to track when buttons are pressed and released, and with multiple character prefabs, I can't afford to set up Unity events for every single one.


    e: While I'm here, I've had another problem. With a custom input actions asset, UI inputs for Submit and Cancel trigger only once and then never again. I've named them Confirm and Back respectively, if that helps anything.
    e2: On that last thing. Switching back to the default input actions makes things work properly, but I find myself needing the custom inputs.
    e3: Right, I've got it. My inputs were set to Press Only. I eventually solved things by using multiple input action assets instead of one with multiple action maps, but it's really not obvious at all.
     
    Last edited: Dec 5, 2019
  9. Meepo0

    Meepo0

    Joined:
    Nov 24, 2017
    Posts:
    24
    I heard with the help of new input system I can do controllers rumble(Vibrate). How can I do it?
     
    TheEugeneL likes this.
  10. Shawn_Flanagan

    Shawn_Flanagan

    Joined:
    Jan 28, 2014
    Posts:
    11
    Gamepad.SetMotorSpeeds(left, right)
     
    Meepo0 likes this.
  11. Meepo0

    Meepo0

    Joined:
    Nov 24, 2017
    Posts:
    24
    Thank You!!!!!
     
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    6,261
    I don’t think it’s going to for my use cases at least.

    I wanted less latency, support for more buttons (since the old one had limits), hotplugging and support for more controller mappings out of the box. I got none (?) of that and I’m pretty sure they’re not priorities.
     
  13. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    78
    Hmm, i think all those other than latency were talked about being a priority.

    Definitely has “more buttons” and support for hot swapping, as far as I’ve seen using it. And it looks to have a decent list of mapped controllers currently (and an ok looking api for making your own custom controller map)

    As far as latency goes, that sucks. I swore with the low level api there was a way to let you just get the raw input data coming from your system, and then you could process that however you wanted. That’d probably be latency free as possible, tho im not sure where thats at or how you go about doing it, but i think its there!
     
    Shawn_Flanagan and AcidArrow like this.
  14. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    327
    I switched my input system from "Both" to "Input System Package (New)" in my Player preferences and now Cinemachine is throwing up errors as it still uses the legacy axis. Has there been any communication with the Cinemachine tam about updating this?
     
  15. Wulf-Games

    Wulf-Games

    Joined:
    Apr 5, 2016
    Posts:
    3
    Ethan_VisualVocal and transat like this.
  16. BrendanLoBuglio

    BrendanLoBuglio

    Joined:
    Apr 9, 2014
    Posts:
    7
    Hey @Rene-Damm! So I've seen a few different reports about present and future support for XR in the new InputSystem, and I wanted to ask you for your recommendation of the correct solution to use for a new XR project.

    My company is starting a ~15 month project which is going to support a variety of input devices -- a VR version that supports Oculus and OpenVR (including the SteamVR 2.0 features for the Index controller), and a flat version that uses traditional game controllers which will launch on PC and potentially consoles.

    With so many disparate input devices I'd love to use the new InputSystem to create a unified layer of abstraction, but I'm unclear on its current and near-term future levels of XR compatibility. In a comment in response to user Hippocoder on this blog post, you say "XR is in the process of getting split off from the main [InputSystem] package. Being part of the core system has proven troublesome for the various XR devices that want to move forward at their own cadence." Does this mean that XR will be separated from the unified InputSystem interface after it splits off? It also seems like there's a known bug with a significant number of errors firing during runtime if an XR device is connected, which I am also experiencing on Unity 2019.2.17f1.

    Overall, is the current package release of InputSystem expected to work at all with XR, or is the aforementioned bug known to be a hard blocker for that? And as someone laying down input infrastructure for a new XR project right now, do you think it's a good investment to develop using the InputSystem package, or would you recommend a different solution?

    Thanks for your time!
    Brendan
     
    Mese96, Iron-Warrior and GliderGuy like this.
  17. Ofx360

    Ofx360

    Joined:
    Apr 30, 2013
    Posts:
    78
    I'm running into this error when I turn 'Active Input Handling' to only the New Input System:


    InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.
    UnityEngine.Rendering.DebugManager.SampleAction (System.Int32 actionIndex) (at Library/PackageCache/com.unity.render-pipelines.core@7.1.7/Runtime/Debugging/DebugManager.Actions.cs:111)
    UnityEngine.Rendering.DebugManager.UpdateActions () (at Library/PackageCache/com.unity.render-pipelines.core@7.1.7/Runtime/Debugging/DebugManager.Actions.cs:168)
    UnityEngine.Rendering.DebugUpdater.Update () (at Library/PackageCache/com.unity.render-pipelines.core@7.1.7/Runtime/Debugging/DebugUpdater.cs:18)
     
  18. Lorash

    Lorash

    Joined:
    May 6, 2019
    Posts:
    67
    Unity itself doesn't quite support the new input system, so this is not entirely unexpected. If you want to use the new faster play mode feature, that will also destroy the new input system for instance, the second time you enter play mode.
     
  19. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    327
    @Schubkraft Is there a sticky thread outlining all such limitations of the new input system? I've experienced this play mode issue and wasn't aware the new input system was causing it. And I also discovered the input system wasn't compatible with cinemachine by accident. :( It would be good to have a list to save users unnecessary pain.
     
  20. WryMim

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    9
    Someone was able to save / load bindings in runtime ? After doing PerformInteractiveRebinding.:(:(:(:(:(:(:(:(
     
    shurum-burum likes this.
  21. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,273
    @Rene-Damm I tested this again now on my Thrustmaster TX wheelbase using latest github develop and I am not getting the response I'd expect on binding (in editor or runtime). Wheels gas pedal is totally omitted, it doesn't even do anything on device debug view and then brake pedal has range of -1 to 1 where it defaults to -1 when not pressed. This for example screws up all binding because it's always inputting this axis first on binding with it's -1 value.

    Do note that it's pretty common that wheels use full axis for a pedal and that some wheels pedals have their axis flipped. It should be normalized on input library when binding such device (you can detect the starting point and detect the change from there and then if needed flip the axis / normalize it). One can also find wheels where pedals use combined axis and then it works like on regular joysticks where the unpressed state is just 0 in the middle using single axis.

    If it helps anything, my device description is here: Thrustmaster TX.json
     
    Last edited: Jan 16, 2020 at 3:07 PM
  22. rizu

    rizu

    Joined:
    Oct 8, 2013
    Posts:
    1,273
    Additionally, is there any chance we could get option to runtime rebinding to be able to bind to devices directly instead of picking the generic options like gamepad/joystick if it finds one to fit?

    I still have issue with especially this TX wheel where some of the axis/buttons of the wheel bind to generic "joystick" and others to this specific device. I'd like to just enforce that you can only bind to specific device for HID devices as there's really no generic option even available for them.
     
  23. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    327
    @Rene-Damm Would you be able to add an 'Advanced settings" bool to PlayerInput, which would expose started, performed and canceled for each action? Currently it's just performed, right?
     
  24. dddon

    dddon

    Joined:
    Jan 3, 2014
    Posts:
    10
    Hello, im having a problem with local multiplayer. I start the game, join by pressing A on two gamepads. When i turn off one gamepad - not two in the same time (randomly, sometimes 1st sometimes 2nd). After turning one of them back on, i cannot control the game. OnDeviceLost and OnDeviceRegained events are executed correclty, but controlls doesnt work on one gamepad. Do i need to restart the device somehow? Input debugger works correctly - players just don't receive messages.
     
  25. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    885
    Boy, too much to catch up on... sorry in advance for everything I'm missing.

    RE 1.0 and preview label and stuff: we definitely made some mistakes there. We are pretty much the first Unity feature developed almost entirely as a package and being that far into production so there was a lot of figuring out as we went. And a couple calls we made certainly could have been "more ideal" :) With the versioning, there should've never been a 1.0 package with a preview label in the first place but oh well.

    Anyway, with 2020.1 slow in the coming, we get to keep the preview label just a bit longer.

    Bit confusing that one. Messages (SendMessage/BroadcastMessage) use a simplified model where buttons only send messages on performed whereas value actions send them on started and canceled.

    When using UnityEvents, you get started/performed/canceled as is (which seems to have confused the heck out of people).

    Could you file a ticket with the Unity bug reporter? Looks like our reconnect logic still needs work.

    Code (CSharp):
    1. // On latest develop, this applies a good deal of configuration out of the box.
    2. // In 1.0.0-preview.3 it does very little.
    3. var rebind = action.PerformInteractiveRebinding();
    4.  
    5. // To prevent rebinds from generalizing controls but rather
    6. // use the path of controls as is:
    7. rebind.WithoutGeneralizingPathOfSelectedControl();
    Yeah, even with the latest round of improvements to rebinds, I think this (rebinds for HIDs) needs further work. I'm thinking something like there being out-of-the-box support for having it add a control scheme for that specific device or something like that.

    Thank you for the file. We do have a number of accumulated issues with the HID fallback that I hope to circle back to in a short while.

    I'll let @StayTalm_Unity answer this one.

    Not sure I follow. Could you outline the API you're looking for?

    To read values, there's the Get<T>() method. But you're probably looking for something else.

    Not yet unfortunately. ATM there's still quite a lot of uncertainty around where and how exactly things will go after 1.0.

    All I can offer at this point is a rough list of the things we consider important/bigger ticket items after 1.0.
    • DOTS support
    • Broader device support
    • "Routed" input for actions (i.e. input triggering action X prevent action Y from triggering)
    • Gesture support
    • Extended haptics
    • Images and models for controls and devices
    In addition, there's a good number of smaller items (such as stateful processors to do gravity and stuff) scattered across the landscape.

    We only have a vague sense of priority for those at this point.

    Best starting point for HIDs is probably this part of the docs.
     
    rizu and GliderGuy like this.
  26. N163LPH03N1X

    N163LPH03N1X

    Joined:
    Jan 10, 2019
    Posts:
    3
    I'll be happy when the controller connection/disconnection is fixed. Two main errors I get are "index out of bounds of the array" and "should net get here" after disconnecting and reconnecting 2 or more controllers. Upon reconnecting, one of the controllers mapping become unresponsive and the second controls both players. I'm running 4 different player inputs using the same input action and it shows in the debug window that there are 4 users. Sometimes the order of the users get mixed up and so controller one would control player 3 etc. If I do not disconnect any controllers my game is flawless but one of the requirements for steam is disconnection/re-connection support, therefor I wont be able to release my game until the issue is resolved with the new input system
     

    Attached Files: