Xbox controller not responding correctly with timescale set to 0

I’m making a simple pause script by setting timescale to 0 when pressing the start button on an xbox controller. This works just fine…until you try to press the button again to unpause the game and then it doesn’t respond till about the tenth time you press it. I changed the input to detect a keyboard input and the same piece of code didn’t have that problem so does anyone know exactly what effect timescale has on gamepad inputs. I have heard that it messes up the asix for the thumbsticks but I thought the buttons still worked fine. This is just the simple toggle I’m using. I read somewhere else that it works better to run the pause function in a coroutine but I tried that and it still didn’t work so if anyone has any suggestions it would be much appreciated.

bool Paused = false;


void Update()
{
	//start is set for my controller 
	If(Input.GetKeyDown(KeyCode.P)) || Input.GetButtonDown("Start"))
	{
		if(Paused == true)//once paused start no longer works
		{
			Time.TimeScale = 1f;
			Paused = false;
		}
		else//start works to pause this
		{
			Time.TimeScale = 0f;
			Paused = true;
		}
	}
}

THIS IS AN ANSWER FROM @Vorrax THAT GOT STUCK IN THE MODERATION QUEUE

I have the same problem, (hope you could understand me, because my english isnt very well) but i know why this happend.

The Problem is that Input is a routine that’s called on Update(), but timeScale sets the frame per secs for the engine to zero, so Update() isnt called anymore since you set timeScale to a higher number than zero.

Sooo … the only input you may have is a mouse or cursor … but I dont know how to handle it with a controller or without mouse.

Maybe someone else could give us a nice answer / solution.

I don’t know if it will work but you can try to set the TimeScale to a very small number : 0.000001. I think that would work.