Input System no button press when timescale = 0
Simply put, hitting the menu button sets Time.timeScale = 0, and the game pauses, but nothing can unpause it or happen during the period. The Debug statement gets called the first time, and then nothing.
private void TogglePause()
{
Debug.Log("Pause was hit");
isPaused = !isPaused;
if (isPaused)
{
AudioListener.pause = true;
Time.timeScale = 0;
}
else
{
AudioListener.pause = false;
Time.timeScale = 1f;
}
}
Any reason why the new Input System would not receive/send InputAction.Performed?
Answer by CCrowell · Apr 27 at 11:30 PM
I am having this issue as well. I discovered my UI wasn't working because I had a PlayerInput instance in the scene and the UI Input Module was not hooked up (did not know I needed to do that). Now that I have it working, I can pause the game, but I cannot unpause.
Same issue... Works in the editor, but not in a build. IPointer events are working, but no input through the Camera.
Your answer
Follow this Question
Related Questions
Problem setting Time.timeScale to 1 after being set to 0 0 Answers
why doesn't timescale work? 0 Answers
How to pause my game when using Time.DeltaTime? 0 Answers
How do i stop my mouse from being in first person when a pause menu appears? 0 Answers
Need help with combo based game input and damage systems. 0 Answers