i’m a beginner take it easy on me .
So the debug.log works once and never again , I mean the console Display : Paused 2 , unpaused 1 and it stays like that forever …
I tried adding a debug.log(“Not working”) in the FixedUpdate and it never displays after pausing the game … One more question does the scripts freez by freezing time ? thx in advance .
This is my code :
void PauseGame(){
if(Input.GetKeyDown(KeyCode.P))
{
GamePaused = !GamePaused;
if (GamePaused) {
Time.timeScale = 0.0f;
Debug.Log ("Paused");
} else {
Debug.Log ("UnPaused");
Time.timeScale = 1.0f;
}
}
}
}