Forum rules - please read before posting.

I need pause menu overlapping other menus

Hi everyone,
AC 1.69.0 + Unity 2018.4.8f1 on a 2d game.

I have this situation: I open the inventory and then, clicking on some particular objects (ex. a letter, a poster, etc) a new graphic menu opens. Then I press ESC and I need the pause menu to open above the other menus so, when I resume the game or close it I can return to the same situation before opened it. Actually the pause menu overlap the menu inventory, but not the graphic menu like a letter or a poster (in this case the pause menu opens behind them).
Inventory and other graphic menus are made directly in Adventure Creator, while the pause menu is a Unity UI linked.

Thank you very much.


  • edited December 2019

    The ordering of menus is dependent on their Source properties - see the Note box in the Manual's "Menus overview" chapter:

    Draw ordering between menus can only be set for those that use the same drawing mode. AC menus are drawn in order of their listing in the Menu Manager, while Unity UI menus rely on the Sort Order values in their Canvas components. AC menus will always appear above Unity UI ones.

    In order to have your Pause menu display above all others, you will either have to make it an AC menu, or make your other menus Unity UI-based. This is because AC-based menus rely on Unity's OnGUI system, which occurs after UI rendering.

  • Thank you very much Chris. With all Unity UI-based menus I can solve the problem (ex. I open the Inventory (this is a AC menu for the moment), then open a graphic menu (ex. a letter). Then I click ESC and the pause menu is above the other menus).

    Now I'd like to improve some things:

    • If I have my letter menu open behind the pause menu (so the letter is graphically greater than the pause menu), and I click on a point outside the pause menu (ex, on a part of the letter menu), it closes the behind menu and leave the pause menu active. Is it possible to "freeze" the areas around the pause menu so, when it is active, if I click on outside areas nothing happens?
    • other situation: I open the inventory then a graphic menu (ex a letter) and then the pause menu (it is in front of everyone). When I click on a button of the pause menu (ex. options) it closes the pause menu to open the options menu (good using crossfade option), but, at the same time, it closes also the graphic menu (letter) and inventory menu, while I'd like that it opens in front of the others (closing only the pause menu), and then, when I click Back to return to Pause menu, I'd like it opens pause menu but with inventory and graphic menu are still behind them (if they are open before). Is it possible?

    thank you.

  • Is it possible to "freeze" the areas around the pause menu so, when it is active, if I click on outside areas nothing happens?

    You can extend the UI's "RectTransform boundary" to extend to the game window's edges - that way clicks on it will still be considered "on" the Pause menu. If your current UI objects are dependent on the current RectTransform boundary's size, just create a new child of the Canvas, make it full-screen, and assign as the boundary that instead.

    while I'd like that it opens in front of the others (closing only the pause menu)

    The "Crossfade" option will close all open menus in favour of the one you're crossfading to. For greater control, you'll need to do it via ActionList instead.

    Set the e.g. Options button's Click type to Run Action List, and assign a new ActionList asset. In this asset, create two Menu: Change state Actions - one to turn off Pause, another to turn on Options.

  • Hi Chris, maybe I'm missing something:
    -here you can see the pause menu (I create a GameObject as canvas child and attached a RectTransform (1920x1080)):
    - here the letter menu:
    - and here the area with issue:

    In order the pause menu has a value of 2 while the letter one of 0 (so the pause menu is in front of the other one).

    I put the pause menu in the scene and then drag the GameObject (with the RectTransform) on RectTransform boundary of AC Pause Menu and I can see a new Costant ID. Then I create a prefab of the menu and delete it from scene. In this moment the link to RectTransform boundary vanishes and remain only a label with the text Recorded CostantID: "number" that is the exact number of the CostantId of my GameObject. Is it correct?

  • Sounds like it. As I said, the Constant ID is how object references are retained after you delete it from the scene. So long as the field's ID value in the Menu Manager matches that on the GameObject in the prefab, it'll re-link at runtime.

    Is there an issue?

  • No, but the red area on this image have a issue:

    I follow all the passages but when I click around the pause menu, where there are nothing behind, all works ok, but when i click on the the red ares (the overlapping of the two menus) it closes the letter menu, while I'd like nothing happens.

  • This may be a UI canvas/prefab configuration issue, since you're looking to make the new RectTransform boundary prevent clicks underneath it.

    It may be a case of adding a Button component to the boundary, or a Canvas Group component that blocks raycasts.

    On the AC level, I'm assuming that the Letter menu closes because you have a Button that performs this. You could try making this run an ActionList asset that uses Menu: Change state to turn it off, but only if the Pause menu is found to be off first (using Menu: Check state).

  • I tried with a button around the menu and it works. Thank you very much.

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.
Do NOT follow this link or you will be banned from the site!