Forum rules - please read before posting.

Hide InGame Menu

Hi there,

What is the way to hide the InGame UI when you enter other custom menus, I tried to use crossfade to go to another menu, but after it fades away, it will appear back in the same place. I tried also to hide it using action, but then I got the "Turn off has no receiver", even if the InGame has a constant IT.

Another thing I would like to know if there is a way to close any menu using "ESC" key.

For example :
I have my game with 3 buttons:
- Menu -> PauseMenu
- Quests -> QuestMenu
- Inventory -> InventoryMenu
If I load the Quest menu and then I press Esc it goes automatically to PauseMenu, while in my case I would like to close the current Menu and go back to the game and show the InGame Menu, however if I'm in the InGame and I press esc I would like to see the Pause Menu. 

I hope I was quite explicit.
Thank you

Comments

  • Welcome to the community, @Hapciupalit.

    To lock a menu so that it does not appear under its usual circumstances, use the Menu: Change state Action - and enter enter the name of that menu as listed in the Menu Manager ("InGame" in this case).

    The default interface has the Esc key (named "Menu" in Unity's Input Manager) toggle the Pause menu because the Pause menu's Appear type is set to On Input Key.  This is a convenience feature for simplicity.  For something more complex, you can rely on Active Inputs to control exactly what happens when the Esc key is pressed.

    Active Inputs are covered in the Manual, and can be configured via the top toolbar (Adventure Creator -> Editors -> Active Inputs Editor).  An Active Input involves having an ActionList asset run when an input is pressed under a given gamestate.  Therefore, you want to have two: one that runs if Esc is pressed during the Gameplay state, and another that runs if Esc is pressed during the Paused state (assuming these Menus all have Pause game when enabled? checked).

    Map both to the "Menu" input, and have them each run a Menu: Change state Action as I mentioned above.  When in gameplay, you can use this to turn on the Pause Menu, and when paused, you can use it to turn off the Pause, Quest, and Inventory menus.  Just be sure to set your Pause menu's Appear type to Manual, so that it is only controlled via Actions.
  • Thank you very much Chris
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.