I’m having a problem where I pause the game, but it immediately unpauses it. This is in OnGUI(). When I click I only see my mouse blink. When I go to read the console after it says.
Pausing Game
Unpausing Game
if(Input.GetMouseButtonDown(1))
if(isPaused)
{
isPaused = false;
Time.timeScale = 1;
Screen.showCursor = false;
Screen.lockCursor = true;
print("Unpausing Game");
}
else
{
isPaused = true;
Time.timeScale = 0;
Screen.showCursor = true;
Screen.lockCursor = false;
print("Pausing Game");
//Bring up screen
}