Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

New Input System sending inputs to game window when scene window selected?

Discussion in 'Input System' started by hippocoder, Aug 29, 2019.

  1. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    As topic, it seems to be sending inputs to both windows... how to resolve this? I have "Both" input systems enabled otherwise HDRP keeps crashing as it's hard-coded to poll the old input system. If that makes any difference...

    So when I move my camera around in Scene view using WSAD + right mouse button (for scene navigation) during play mode (to observe the action in progress) the Game view (player) still receives updates and it really shouldn't...
     
  2. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    -Open the Input Debugger
    -Disable "Lock input to game view" under Options.
     
  3. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Thanks! Nothing changes behaviour wise though.

    Changing the Lock input to game view value results in:
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.SettingsProvider.Repaint () (at C:/buildslave/unity/build/Editor/Mono/Settings/SettingsProvider.cs:123)
    3. UnityEngine.InputSystem.Editor.InputSettingsProvider.OnSettingsChange () (at Library/PackageCache/com.unity.inputsystem@0.9.5-preview/InputSystem/Editor/Settings/InputSettingsProvider.cs:291)
    4. UnityEngine.InputSystem.InputManager.ApplySettings () (at Library/PackageCache/com.unity.inputsystem@0.9.5-preview/InputSystem/InputManager.cs:2191)
    5. UnityEngine.InputSystem.Editor.InputEditorUserSettings.OnChange () (at Library/PackageCache/com.unity.inputsystem@0.9.5-preview/InputSystem/Editor/Settings/InputEditorUserSettings.cs:101)
    6. UnityEngine.InputSystem.Editor.InputEditorUserSettings.set_lockInputToGameView (System.Boolean value) (at Library/PackageCache/com.unity.inputsystem@0.9.5-preview/InputSystem/Editor/Settings/InputEditorUserSettings.cs:41)
    7. UnityEngine.InputSystem.Editor.InputDebuggerWindow.ToggleLockInputToGameView () (at Library/PackageCache/com.unity.inputsystem@0.9.5-preview/InputSystem/Editor/Debugger/InputDebuggerWindow.cs:196)
    8. UnityEditor.GenericMenu.CatchMenu (System.Object userData, System.String[] options, System.Int32 selected) (at C:/buildslave/unity/build/Editor/Mono/GUI/GenericMenu.cs:121)
    9.  
     
  4. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Hmm. This should not be the case (assuming "Lock input to game view" is disabled). Can you file a bug with a repro project (that way we also get your system config), and post it's number here?
     
  5. laessnb

    laessnb

    Joined:
    Jun 10, 2014
    Posts:
    101
    @jonas-echterhoff I'm having issues, in play mode, where the game view mouse cursor position is updating while I'm completely switched to scene view. Toggling Lock input to game view makes no difference. I'm on 2019.4 + input system 1.1 preview. Any thoughts? Thank you.
     
    MUGIK likes this.
  6. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    452
    Did you find a solution? It's driving me nuts...
     
  7. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    341
    The more I use Unity the more I believe this:
    • Unity developers don't use Unity
    • Unity doesn't have a testing department
     
    Qd_ likes this.
  8. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    452
    Users are the testing department :)
     
  9. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    617
    I prefer being called the Paying Customer.
     
    SniperED007 likes this.
  10. wanfei

    wanfei

    Joined:
    Dec 22, 2018
    Posts:
    19
    @jonas-echterhoff hello I have a problem with inputsystem,Clicking the window maximization button still triggers the click event in Game Scene.How to solve this problem.Looking forward to your reply,Thank you.
     
  11. itadakiass

    itadakiass

    Joined:
    Nov 11, 2017
    Posts:
    21
    This is only happening when using device directly through "Mouse.current".
    Use actions instead, they are properly filtered out when "Lock input to game view" is disabled (brilliant naming...)