Search Unity

Official "Meet the Devs" -- Post Your Questions

Discussion in 'Input System' started by Rene-Damm, Apr 2, 2020.

  1. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    @Rene-Damm Keijiro has a plug-in that adds MIDI input to the new input system. Is native MIDI integration planned? What about OSC and MIDI 2.0 ?
     
  2. carl010010

    carl010010

    Joined:
    Jul 14, 2010
    Posts:
    140
    I completely agree. With the event system, you can't even detect if a key is being held down. If you hold down a key and read its value, it will fluctuate between 0 and 1 without ever letting go of the key. This new Input system is leaps and bounds better for reading input in the editor. Not even to mention the things I've been able to do in the last 2 days with being able to read controller inputs in an editor script.

    @Rene-Damm you and the team please reconsider taking away input support from editor scripts.
     
  3. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    So far, it's only a consideration. No final decision has been made.

    Being able to use the gamepad in the editor was the initial use case that motivated the feature. It's also one where I don't think offloading it to IMGUI/UIElements events will necessarily work as well. For any pointer type or keyboard type input (essentially anything that *has* to deal in focus) I think going to the current input system edit mode support really is a bad idea. For gamepads and XR devices, not as clear cut. We'll have to see.

    The ongoing extension of UI event input for pens also covers UI Elements, not just IMGUI. Though I'd consider having pressure and tilt information even at the old UnityEngine.Event level available is better than what you get ATM with the input system.

    Not directly. One thing you can do is have a playerIndex parameter on your processor.

    Code (CSharp):
    1. public class ToPointerPosition : InputProcessor<Vector2>
    2. {
    3.     public int playerIndex;
    4.  
    5.     public override Vector2 Process(Vector2 value, InputControl control)
    6.     {
    7.         var player = PlayerInput.GetPlayerByIndex(playerIndex);
    8.         var camera = player.camera;
    9.  
    Having something more built-in to more easily deal with mouse-pointer-vs-gamepad-stick kind of setups is an item in the bucket.
     
    WAYNGames likes this.
  4. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    There's no plans ATM to add MIDI support ourselves. For now, there's too much other stuff that needs addressing first.

    No decision has been made. We're considering the options. And feedback (like in this thread) is taken into account.
     
  5. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    56
    Trying to integrate a Leap Motion controller as a mouse Pointer (grab gesture is click). Would be a great demo on Q&A to show how to integrate custom devices.
     
  6. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    Here you go (might still be a bit until hi-res versions are available). Not a great video admittedly, but I thought until we have something better in place here, hopefully better than nothing :)
     
  7. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Is there Force Feedback support?
     
  8. Magic-4e

    Magic-4e

    Joined:
    May 9, 2018
    Posts:
    25
  9. transat

    transat

    Joined:
    May 5, 2018
    Posts:
    779
    +1 for editor support if it doesn’t slow things down too much. This would open up lots of possibilities.