#how are you calling the pause resume and
1 messages · Page 1 of 1 (latest)
ok so for 1:
- The game is always going to be pasued when you press the Restart button. So not only will timeScale stay as 0, but
pausedwill stay true. You probably want to callresume()as part of the Restart function. Also this is very silly code:
isPaused = false;
if(!isPaused)
{
Time.timeScale = 1;
}```
isPaused is obviously going to be false here since it was set to false in the previous line. The iif statement is pointless
As for why you need to click it twice - your static variable is not going to reset automatically - and perhaps Start is running when you enable the menu for the first time and setting it false.