-
::Add a debug log into your unpause game() function
<code> public void UnpauseGame()
{
pauseMenu.FadeUIOut(fadeTime);
Time.timeScale = 1;
gameIsPaused = false;
Debug.Log("Game Unpaused");
}</code>
When testing out the game, if the debug message appears in your console, then the unpauseGame function is working,
if it doesn’t, then there is a line within the function that is causing an error
tai Former Patron
::Hi, I have tried added to the function as follow
<code>public void UnPauseGame()
{
//pauseMenu.FadeUIOut(fadeTime);
gameIsPaused = false;
Time.timeScale = 1;
Debug.Log("Game Unpaused");
}</code>
And the result is this
It printed out Unpaused but the game still freeze
::It looks like the animation is still running. Are you able to move?
Also check whether the gameIsPaused
variable on your Game Manager (through the Inspector) is true or false. Something else might be setting it back to true
.
tai Former Patron
::I cannot move at all. I have check the Game Manager game object and the gameIsPaused variable is still checked.
::Can you search your scripts to see if any other script is setting gameIsPaused
back to true?
If you are using Windows, you can open Command Prompt and navigate to your project folder, then use findstr /s /c:"gameIsPaused" *.cs
to find all the scripts that change the value of gameIsPaused
.
tai Former Patron
::This is search result.
Should i post all the code here.
::Everything seems to be working fine. Perhaps you can share your project on Google Drive. I will have a closer look.
tai Former Patron
::is ur doubt already solved or do u need more help?
tai Former Patron
::It still freeze. Im waiting for Terence respone.
::I think you forgot to include your scene files in your project Tai.
tai Former Patron
::That is weird because i just check the zip file and all the scenes are there but when search on gg drive there nothing. Maybe gg drive delete it.
::Perhaps you can ZIP your project folder and share it over Google Drive? That way Google can’t delete it.
tai Former Patron