Search Unity

Input System Update

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

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    1,202
    Seems to only be available in 2019.2+. I was looking for something that would work for 2019.1+. Thanks anyway.
     
  2. Adrian

    Adrian

    Joined:
    Apr 5, 2008
    Posts:
    368
    I can think of two workarounds:
    Code (CSharp):
    1. // Use PackageManger.Client (from 2017.3)
    2. var req = UnityEditor.PackageManager.Client.List(true);
    3. // ... wait for request to complete
    4. var info = req.Result.FirstOrDefault(p => p.name == "com.unity.inputsystem");
    5.  
    6. // Read the Json yourself
    7. [Serializable] public struct CustomInfo { public string version; }
    8. var json = System.IO.File.ReadAllText("Packages/com.unity.inputsystem/package.json");
    9. var info = JsonUtility.FromJson<CustomInfo>(json);
    Or you can use reflection to call the FindForAssetPath method in 2019.1. It's on the internal class Packages and called GetPackageByAssetPath.
     
    sstrong likes this.
  3. zxubian

    zxubian

    Joined:
    Oct 22, 2015
    Posts:
    5
    How would the new Input System work with DOTS? Is there any additional setup required to move from MonoBehaviours + legacy input to ECS + new Input System?
     
  4. kakysha

    kakysha

    Joined:
    Mar 19, 2018
    Posts:
    4
    AS you removed the roadmap & timelines from Github, what's the Unity release in which new system finally lands in?
     
  5. Ethan_VisualVocal

    Ethan_VisualVocal

    Joined:
    Mar 23, 2016
    Posts:
    143
  6. Shawn_Flanagan

    Shawn_Flanagan

    Joined:
    Jan 28, 2014
    Posts:
    10
  7. TheOtherMonarch

    TheOtherMonarch

    Joined:
    Jul 28, 2012
    Posts:
    87
    I heard 1.0 preview for 19.3 and verified for 20.1
     
  8. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    919
    Correct.
     
  9. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    919
    It will find its way to youtube too. There were a lot of talks at Unite :)
     
  10. DouglasPotesta

    DouglasPotesta

    Joined:
    Nov 6, 2014
    Posts:
    77
    Rene-Damm likes this.
  11. Roni92pl

    Roni92pl

    Joined:
    Jun 2, 2015
    Posts:
    273
    Im little worried after I saw it's codegen solution. Is it possible to add controllers and configure their input at runtime?
    Like in simulation racing games, where game doesn't have predefined input devices, and they can be added in configuration, with mapping buttons to actions, even changing filtering, dead zones etc.
     
  12. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    4,531
    It is.

    You mainly define the Actions and default devices. You can remap any Actions as you wish. You also can define custom devices. But you really need to install it and check the examples (they are on the package manager page) so see it for yourself.
    The codegen is for you to not mess up something during development (like Input.GetKey("sihft")) and so on. And also not having strings make it a little bit faster and more prone to garbage.
    You can define custom layouts to your heart's content.
     
  13. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    737
    We had a mishap internally that led to us ending up with a video tutorial using the code-generated workflow rather than PlayerInput (which does not involve code generation and has a much lower getting started cost). This (unsurprisingly) left a number of users with the impression that the workflows of the new system are very technical.

    We are in the process of creating and releasing an updated video tutorial based on the workflow described in the Quick Start Guide. There is also information and a demonstration of the workflow in the talk from Unite.

    And yes, like @Lurking-Ninja says, all the things you mention are possible.
     
    Roni92pl likes this.
  14. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    1,202
    We recently implemented the Input System for one of our assets (sci-fi ship controller) and it was neither difficult or overly technical. The new Input System is well thought out and covers many scenarios that the old one didn't. It is consistent and was also easy to implement with touch screens.
    v1.0.0 preview 1 seems very solid and is certainly worth looking at if anyone is just starting out with a new game or project. If devs tried earlier versions, like we did, and walked away, now is the time to come back and take another look.

    Unity, it's been a while in coming, but we think it has been worth the wait.
     
    Lars-Steenhoff and Rene-Damm like this.
  15. JamhammerRob

    JamhammerRob

    Joined:
    Jan 15, 2016
    Posts:
    12
    Have there been any examples of dealing with multi playerInputs, UI systems and how to manage the multi event system along with the uiinputmodule? We've begun retrofitting the new system into our game and are getting to the point where we be dealing with UIs and it's a bit muddy at the moment. Thanks!
     
  16. Rene-Damm

    Rene-Damm

    Unity Technologies

    Joined:
    Sep 15, 2012
    Posts:
    737
    Unfortunately, we don't have a sample for that ATM. Overall, I'd say our samples have proven quite inadequate so far and spending some time there is on the list. Here's my personal list ATM of what I'd like to see happening.
    1. Add simple touch sample.
    2. Simplify SimpleDemo to really be simple.
    3. Add sample for local multiplayer setup including UI.
    4. Add sample for rebinding UI.
    5. Add EditorWindow sample.
    6. Add sample for input recording and playback.
     
    Lars-Steenhoff likes this.
  17. mahdi_jeddi

    mahdi_jeddi

    Joined:
    Jul 18, 2016
    Posts:
    48
    One thing that got me during the setup process was not setting a default Map (Player/UI) on the player input component, that prevented input. I think there should be warning log or message on the debugger when no Map is enabled at the moment. The idea of input debugger is really genius and I think you should use it more for this kinds of trouble shooting.

    This is actually one of the things that I have problem with I use ReWired for input. It's really simple and easy to miss, like not having a audio listener in the scene or having 2 of them.