These forums are archival. Please visit us on discord!
After yet more wrestling with the underlying Unity 3D engine, we've finally managed to work around yet another of the engine bugs that really annoy people a lot. This one was related to keys not properly getting cleared when (for instance) you alt-tab out of the game. The alt key would usually remain stuck on until you tapped it again. Previously we were unable to solve this at all because we could not detect loss of focus, but we discovered a hack to get around that shortly before 1.0 (to everyone's joy, ours most of all). The next problem was that, even knowing when we had lost focus, the problem was that the Unity 3D engine's Input.GetKey and Input.anyKeyDown and so forth were the things returning the wrong results. Not being able to fix their code directly, we were fortunate to find a Input.ResetInputAxes method that lets us just clear all the input state in their engine when we detect the resumption of game focus using our aforementioned hack. And there was much rejoicing! This will be coming to AI War as well, before anyone asks.
Woohoo! I'm really glad this one was put to bed. It's great that it applies to AI War, too.
...Does this mean we can get modifyer keys as an option for the controls without unity bug now?