I noticed today that if Update Mode in the Input System package is set to “Dynamic Update”, reading input (.triggered on an action mapped to keyboard in my case) in FixedUpdate will sometimes, seemingly randomly, fail, i.e. no input is registered. This only seems to be happen if vsync is disabled, and changing the update mode to Fixed Update gets rid of the issue too. Is this the intended behaviour? Can we simply not reliably read input in FixedUpdate if the update mode is set to dynamic, or is this a bug? I’d expect this to be mentioned somewhere in the package documentation if it’s the expected behavior, but I can’t find anything. This is in 2020.2.1.
It is the nature of FixedUpdate and the fact that by default the FixedUpdate called 50 times a second (you can change it in the project settings). You should match the input update mode with your intention, if you have physics-based movement, use FixedUpdate, if you have strictly kinematic movement governed by your code and input, use dynamic update.
https://docs.unity3d.com/ScriptReference/MonoBehaviour.FixedUpdate.html