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
    Elvin Sim
    Level 10
    Participant
    #13959
    Elvin Sim
    Level 10
    Participant
    #13960
    Elvin Sim
    Level 10
    Participant
    Helpful?
    Up
    0
    ::

    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
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    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
    Elvin Sim
    Level 10
    Participant
    #13972
    Elvin Sim
    Level 10
    Participant
    Helpful?
    Up
    0
    ::

    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
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

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

    #13976
    Elvin Sim
    Level 10
    Participant
    #13978
    Joseph Tang
    Level 13
    Moderator
    Helpful?
    Up
    0
    ::

    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
    Level 10
    Participant
    Helpful?
    Up
    0
    ::

    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: