Stops detecting continuous keyboard Input after the first scene change to that scene.
When using WASD or Arrow Keys to move and continuously press one of the buttons and the scene changes Unity does not continue to detect the input in the newly loaded scene. This causes the player object to stop still in the newly loaded scene. You have to let go of the key being pressed and then repress it in order to continue moving in the same direction.
This however is not always the case. If you go back and forth between the same two scenes the issue disappears, after having been present the first time the second scene was loaded, the movement becomes smooth and the input is continuously detected as needed as long as you just go between the same two scenes. If you then go into a third scene the issue of input detection comes back.
For the input I am using Unitys Input Manager functions, an axis for horizontal input, that's placed on my Player object. The Player object is persistent between scenes.
I am also using a controller. A wired XBOX controller and this issue is not present at all when using the controller, the input detection is completely sound.
Any help with this or just an understanding of why this might occur would be greatly appreciated.
Answer by BenoitFreslon · Feb 02, 2017 at 06:20 PM
Hello, Did you find a workaround? I would like to detect MouseInput between 2 scenes.
Your answer
Follow this Question
Related Questions
Detect mouse inputs when the scene is changing to another scene. 2 Answers
Switching Scenes in 2D 1 Answer
Switching between mouse/keyboard and controller for UI navigation (using Input System) 0 Answers
Change input to collsiion? 0 Answers
Input keys not working ! please help me,Can't use input keys ! please help me ! 0 Answers