Forum rules - please read before posting.

Gameplay sometimes unpauses when transitioning between Menus

edited September 2020 in Technical Q&A

[Unity 2019.4.9f1 - AC v1.71.8]

Hi!

I'm experiencing a strange behavior when I navigate through menus. For instance: when I navigate from the Pause Menu to the Options Menu, sometimes it happens that the gameplay "unpauses" (i.e. my character can move).

It doesn't happen every time, and it's more likely to happen the very first time I enter the Pause Menu when I start my game\scene, as if the first time I do it it takes longer to process.

For context reasons:

  • I access the Pause Menu via the Escape keyboard key or the Start gamepad button. Both are set using the AC new Unity Input System integration.
  • Both Pause and Options Menus have "Pause game when enabled" ticked.
  • Both Pause and Options Menus don't have any fading (hence the "Update while fading out" tickbox is invisible)
  • Both Pause and Options Menus are AC Menus, with default font.
  • The Options menu has a couple extra sliders\buttons but that's it.

This is my Interface settings.

Is there something I am missing?

Thanks in advance!

Comments

  • edited September 2020

    So I'm clear: the issue is not when Pause is shown, but Options?

    Is gameplay unpaused for the whole duration that Options is open, or only for a frame or two at the moment of transition?

    How are you switching between the Menus - using a Button's Crossfade option, or a dedicated ActionList with a pair of Menu: Change state Actions?

    Are any other ActionLists involved, i.e. when Pause turns off / Options turns on? It may be related to their properties. If any ActionLists are involved, lets see details of their properties at the top of their Inspectors.

    Though the use of the new input system probably isn't affecting things, it would still help to rule it out conclusively. In a duplicate project, can you test switching back to Unity's default input system?

  • edited September 2020

    The Pause Menu shows up accordingly. When I switch to any other Menu (specifying so you know it doesn't happen just with the Options one) from that it takes even up to a whole second to complete the transition.

    During the whole transition time, the game unpauses and it is paused again when the transition is over and the other Menu is visible.

    Here you can see how, the first time I do it, it takes longer to switch, while the following times happens immediately. Sometimes, when I first run it, I even get the slider values momentarily set to 0 before they are updated accordingly (some of them are linked to Global Variables).

    While I do have other Unity UI Menus registered in the Menu Manager, the Pause Menu and all its "submenus" still have AC as a source.

    I have tried switching back to the old Input System, but nothing changed and I have not used any dedicated ActionList. The only ActionList there is, is the DeselectInventory one for the Pause Menu (and I didn't touch it):

    Also the OptionsButton has the default settings (so also the default Crossfade option) but here are its properties, just in case:

    And these are the Options Menu properties, instead:

    I hope I haven't left out anything important!

  • Does this occur in a fresh AC scene? Try enabling the "AC Status" window via the bottom of the Settings Manager, which will list all ActionLists currently running. Are any being listed during the transition?

    The screens all look very similar to the default interface, but I can't recreate such an issue. Are you able to recreate the problem with a new set of Managers created by the New Game Wizard? It does seem like there must be some key change or difference that's causing this.

    Try duplicating your MenuManager asset file, assigning the new one, and deleting all menus except those above - so that no others can interfere. Is this still occuring?

  • edited September 2020

    I believe that setting up an empty scene led me to find the issue and it was totally on me! :'(

    I have a Unity UI that appears OnAfterSceneChange for a specific amount of seconds before disappearing again.

    If I enter the Pause Menu before such UI has disappeared, although pausing right away ("Current game state: Pause"), when I transition to another Menu the game "waits" ("Current game state: Normal") for the other UI to finish its Coroutine before completing the transition.

    I think I'll have to pause or stop the Coroutine as well, while the gameplay is not active!

    I apologize and thanks for your help!

  • I also have an issue with the game unpausing between switching off my various Unity UI menus. They are all set to pause the game. But they are also set to transition between themselves (Canvas group fade).

    It is during these transitions that the game briefly unpauses.

    I have the "Freeze" menu set according to the tutorial, but it does not help in this case.
    How can I fix this, please?

  • How are you transitioning between Menus? With the dedicated "Crossfade" option in your Button elements, or with an ActionList that runs a pair of Menu: Change state Actions?

    If the latter, what are the properties of this ActionList?

  • edited February 5

    It is the latter. I checked the properties and it had Unfreeze 'pause' menus checked. I unchecked it and problem solved! Thank you!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.