Hi!
My HUD is composed by 3 menus, that I plan to set as fixed (so nothing should close them).
If I click esc the game shows the pause menu without closing my HUD menus.
But if I go in the Pause menu, then select one other sub menu (ex. Options) and then I click esc again, it crossfade back to Pause menu, but it closes also all the HUD menus too.
So this works:
- Esc (alone) opens and closes Pause menu.
This doesn't work:
- Esc -> opens Pause menu.
- Click "Options" button -> crossfade to Options Menu
- Esc -> crossfade back to Pause menu -> it closses Options Menu -> it closes also the HUD menus.
Probably the issue is in Crossfade. If I give the command crossfade to a menu, it closes all the other menus.
How could I avoid to close the HUD menus?
If possible "Esc" could have the following behaviours:
- Open Pause menu if nothing is opened.
- Close (without crossfading) the last menu called, if Esc is pressed
In case let me know where is the cs file I could change to implement this.
Comments
Crossfade will close all active menus, and enable just the one specified. Instead, use an ActionList asset, with two Menu: Change state Actions to explicitly close the Pause menu, and open the Options menu. Set the "Pause -> Options" button's Click type to Run Action List, and assign the asset.