Search Unity

Actions/Action Events on Linux Work on Everything BUT the Game Window

Discussion in 'Input System' started by DTM1218, Oct 10, 2019.

  1. DTM1218

    DTM1218

    Joined:
    Oct 27, 2017
    Posts:
    3
    Hey there, so I picked the New Input System up recently after hearing that it's nearing a production-ready release. I've been enjoying it so far, and I've got a good idea how to set up action events and callbacks.
    So I'm using the Linux editor, and one thing that's bugging me is that the inputs are only read from my player input when my window focus is on anything except the game window (which will pick-up the old inputs as well, which is useful for transitioning old input code). Is there an oversight in my code, or is this a bug with the Input System package itself?
    I don't know if there are many [if any] other active users using this package in the Linux editor, but some feedback would be appreciated.
     
  2. Jichaels

    Jichaels

    Joined:
    Dec 27, 2018
    Posts:
    237
    If you already ported your game to the new input system, you should go to Player > Active input handling > Have only the new one. I really don't know how "Both" is handled, but I would never even try to work with that
     
  3. Rene-Damm

    Rene-Damm

    Joined:
    Sep 15, 2012
    Posts:
    1,779
    @DTM1218 Could you file a bug report with the Unity bug reporter? From what you describe, this is definitely not expected behavior.

    BTW one thing you can try to work around it is go to the input debugger (Window >> Analysis >> Input Debugger) and under "Options", enable "Lock Input to Game View". This should disable focus checks and result in input always being routed to only the game.
     
  4. DTM1218

    DTM1218

    Joined:
    Oct 27, 2017
    Posts:
    3
    So this is the main cause of the issue at hand. When both are enabled at the same time, the game window focus is only allowing the classic input rather than both systems at once. This solved my issue, but I was hoping to be able to transition my code from one input style to the other.
    For the reason stated above, this doesn't seem to be a solution when both inputs are enabled at the same time. Regardless, I'll put this issue up on the bug tracker.
     
    Last edited: Oct 11, 2019