Forum rules - please read before posting.

Menu Turns On when Button is clicked; Menu remains on until mouse is no longer over the menu space

Hi all!

I'm aiming to have an inventory menu pan down from a button when this button is clicked, and then I am hoping to leave this menu on while the user leaves their cursor on it.

When the player removes their cursor from the menu area, it should disappear / turn off.
Is it possible to achieve this with Unity UI prefabs?

Any help is appreciated, thank you!

Comments

  • I also noticed that when I select "pause game when enabled" for the inventory menu, the movement of the player from before clicking on the inventory menu continues.

    I tried disabling the movement in the engine when the menu is turned on, but my character seems to be still moving in the background strangely.

    Is there any way to prevent this behavior?

    Thank you!

  • The game comes out of "pause" mode when running an interaction - so if the Player has a movement destination, they'll be able to while it runs.

    They shouldn't be getting a movement command by clicking the Menu, however. Check that your Menus have "RectTransform boundary" values that each cover the visible/clickable portion of your UI - it's this that AC uses to work out if clicks should register in the scene or not.

    If necessary, you can use the Character: Move along path Action's Stop Moving command to halt the Player.

    When the player removes their cursor from the menu area, it should disappear / turn off.

    The way to do this is to have a separate, invisible Menu that covers the same area of the screen as the Inventory menu. Set its Appear type to Mouse Over - so that it turns on/off when the mouse enters/exits its area - and then have its ActionList when turn off asset run the Menu: Change state Action to turn off the Inventory menu.

  • Awesome, thank you so much!
    Looks like the stop moving command when turning on the menu helped with that! :)

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.