[HOWTO] How To: Address Alt+Tab Bug w/Input System Package
Posted: Wed Aug 16, 2023 8:25 am
This FAQ regards a general Unity / Input System bug, not specific to the Dialogue System.
If you're using the Input System package and are facing this issue:
ALT-TABBING OUT OF BUILD LEAVES THE ALT KEY PRESSED ON RETURN
Add a script with this method to your game (e.g., on the Dialogue Manager):
(Contributed by Bontemps Games. Wishlist While The Iron's Hot.)
If you're using the Input System package and are facing this issue:
ALT-TABBING OUT OF BUILD LEAVES THE ALT KEY PRESSED ON RETURN
Add a script with this method to your game (e.g., on the Dialogue Manager):
Code: Select all
private void OnApplicationFocus(bool hasFocus)
{
// resetting to avoid the problem of alt-tabbing making altKey stuck.
InputSystem.ResetDevice(Keyboard.current);
}