Forum begins after the advertisement:


[Part 9] My pause effect have some bugs

Home Forums Video Game Tutorial Series Creating a Metroidvania in Unity [Part 9] My pause effect have some bugs

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #13958
    #13959
    #13960
    Elvin Sim
    Participant

    Even I add the destroy in mainmenu scripts, it will also cause stop for the thing that I touch and immediately pause

    #13962
    Joseph Tang
    Moderator

    The Destroy in MainMenu scripts is unnecessary as it only deals with destroying DontDestroyOnLoad(gameObject); and not other gameobjects like collectibles.

    If you want the ability display or shard display to finish even while pausing,
    Change the WaitForSeconds() to WaitForSecondsRealtime() in the respective scripts. This will allow the pickup display to continue as per normal without being affected by the timescale.

    If you want the Pause menu to overlay pickup display,
    Go to the Canvas Prefab > Canvas Property in the inspector, and set the Sorting order to [1] or higher.

    #13971
    #13972
    Elvin Sim
    Participant

    okok thks, and now I have another problem is that when I pause the game, it will come out the argument null error

    #13974
    Joseph Tang
    Moderator

    Can you check if your UIAudio.cs has a sound clip attached in the Canvas Prefab?

    #13976
    #13978
    Joseph Tang
    Moderator

    Ah, Can you try adding an Audio Source property to your Canvas Prefab? I believe that’s the reason for the error.

    #13980
    Elvin Sim
    Participant

    Thank you, It works now!!!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: