Forum begins after the advertisement:


[Part 9.5] Scene doesn’t load because scene fader remains black

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 9.5] Scene doesn’t load because scene fader remains black

Viewing 15 posts - 16 through 30 (of 33 total)
  • Author
    Posts
  • #16525
    Chloe Lim
    Level 10
    Moderator
    Helpful?
    Up
    0
    ::

    Add a debug log into your unpause game() function

        public void UnpauseGame()
        {
            pauseMenu.FadeUIOut(fadeTime);
            Time.timeScale = 1;
            gameIsPaused = false;
            Debug.Log("Game Unpaused");
        }

    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

    #16526
    tai
    Level 8
    Former Patron
    Helpful?
    Up
    0
    ::

    Hi, I have tried added to the function as follow

    public void UnPauseGame()
    {
        //pauseMenu.FadeUIOut(fadeTime);
        gameIsPaused = false;
        Time.timeScale = 1;
        Debug.Log("Game Unpaused");
    }

    And the result is this

    It printed out Unpaused but the game still freeze

    #16544
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    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.

    #16545
    tai
    Level 8
    Former Patron
    Helpful?
    Up
    0
    ::

    I cannot move at all. I have check the Game Manager game object and the gameIsPaused variable is still checked.

    #16547
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    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.

    #16551
    tai
    Level 8
    Former Patron
    Helpful?
    Up
    0
    ::

    This is search result.

    Should i post all the code here.

    #16560
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Everything seems to be working fine. Perhaps you can share your project on Google Drive. I will have a closer look.

    #16562
    tai
    Level 8
    Former Patron
    Helpful?
    Up
    0
    ::

    https://drive.google.com/drive/folders/1-mQmAauuI7mYI2TN492vlhqACuFRC_7X?usp=sharing
    Sorry i dont know what to upload so i upload everything

    #16566
    A_DONUT
    Level 6
    Moderator
    Helpful?
    Up
    0
    ::

    is ur doubt already solved or do u need more help?

    #16573
    tai
    Level 8
    Former Patron
    Helpful?
    Up
    0
    ::

    It still freeze. Im waiting for Terence respone.

    #16582
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    I think you forgot to include your scene files in your project Tai.

    #16583
    tai
    Level 8
    Former Patron
    Helpful?
    Up
    0
    ::

    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.

    #16584
    Terence
    Level 30
    Keymaster
    Helpful?
    Up
    0
    ::

    Perhaps you can ZIP your project folder and share it over Google Drive? That way Google can’t delete it.

    #16587
    #16588
    A_DONUT
    Level 6
    Moderator
    Helpful?
    Up
    0
    ::

    Sir will reply u soon!

Viewing 15 posts - 16 through 30 (of 33 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: