[Regression] The "Press" modifier on a component public InputAction binding no longer works
Previously, press worked similar to "Input.OnButtonDown." Now it doesn't seem to function at all.
Reproduction steps:
- Create a script with a public InputAction. Enable the action in the Start function. Add a function the the performed event of the action that will print a debug line or something that shows the event fired.
- Add a single binding such as "Press Mouse leftButton" "Press Keyboard a" or "Press PrimaryAction"
- Press play, click on the game window, and actuate the appropriate binding
Here is the scene and script from my minimal reproduction. ActionPress (2).zip
Expected Result: When the bound input is executed, you should get an indication that it happened
Observed Result: No reaction.
Tested with 2018.2.0b1 and commit e216c7333858a2682b37964721f54201580565f9
Found that InputDevice.wasUpdatedThisFrame is broken in the editor when the device gets updated in editor updates. This in turns breaks ButtonControl.wasJustPressed.
Looks fixed with commit repo commit a357d9d004297ddc591eb45568efe9c21fff97da and unity editor commit 725fd26e2382.
Let's leave this issue here until the fix code makes it into a public editor release.