Search Unity

Question Stop input from executing when regaining focus

Discussion in 'Input System' started by CDF, Jan 14, 2022.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    So my app is set to run in background. and have set the "Background Behaviour" in input settings to "Reset and Disable All Devices"

    However, when playing the game in standalone build, if I switch app focus, press a button on my gamepad, then re-focus the app. That action is executed upon returning.

    How can I disable this?

    When I re-focus the app, I don't want any inputs that occurred during lost focus to execute.