Reproduction steps:
1. Open the attached "repro_IN-IN-45693.zip" project
2. Open and analyze the "InputPresser" script in the project Assets folder to understand how the script behaves
3. Enter the Play Mode
4. Press and hold the right arrow key
5. Notice that the Console keeps printing the output "holding right" - that means that the right arrow key is being registered
6. While holding the right arrow key, press the "R" key to reload the scene
7. Observe the Console output
Expected result: The Console keeps printing out "holding right", as the right arrow key is still being registered
Actual result: The Console is not printing out "holding right", as the right arrow key is not being registered anymore
Reproduced with: 2021.3.28f1, 2022.3.4f1, 2023.1.4f1, 2023.2.0a23
Reproduced on: Windows 10
Note:
- If you keep holding the right arrow key after reloading the scene, and press "P", the scene will be paused, proving that the right key is not being registered, as the script is written to only execute the pause if the right arrow key is not being pressed when pressing the "P" button
- Reproducible in Player