Forum rules - please read before posting.

Problem Turn off menu

edited November 1 in Engine development

Hi,

I have a small problem with my menu that allows you to display the hotspot icons when you click on the button.

I would like that after the player clicks on it, that he becomes inactive for 3s.

I tried to add in the inspetor of the button in "Onclick" an action list

with a "menu change state" to "turn off" then a delay of 3s and a "menu change" with "turn on" but it doesn't work. On the other hand, if I put a Lock Menu it works.
But I would like the menu to be just disabled during its 3s because Lock totally disables the menu.

Do you have any idea how to proceed ?

Comments

  • Instead of turning off or locking the Menu, use the Menu: Change state Action to hide the Menu's "hotspot" element.

    Then, set the element's When invisible field to Disable Interactability.

  • I used use the Menu: Change state Action to hide the Menu'set I put the element on Disable Interactability

    But the only thing it does is that it deactivates the pressed sprite of the button for 3s.

    It doesn't disable the action of the button (FlashHotspots) or the sound that plays every time you click on it.

  • Pause the game during this time and check the Inspector of the Button. Is it's Interactable field unchecked? That's what AC should be affecting, and the Button should no longer have any effect when clicked when so.

  • Yes, the interactable box is unchecked.

    But why then does the action as well as the sound occur ?

  • I cannot recreated such behaviour.

    How are you interacting with it - the system cursor, a simulated cursor, or by direct control? And with Input System or Input Manager for input handling?

  • Here is my interaction with the interface:

    For the management of the entrances, I am in Both.

  • Are you specifically using Input System integration, and does this occur if you switch your "Input method" to "Mouse And Keyboard" and test in the Editor?

  • It gives the same result in mouse and keyboard. I had put Both for the inputs because it sometimes did strange things to me that didn't work properly when I exported it as an apk like the pause menu that was no longer clickable.

  • But are you using Input System and AC's integration for it?

    Create a new Unity project, import AC and use the New Game Wizard to create a new Sample 3D scene. In the Menu Manager, adjust the default InGame menu to use "Unity UI Prefab" as its Source, and change the Menu button element to "Disable Interactability" and uncheck "Is visible?".

    Does clicking it at runtime open the Pause menu?

  • edited 7:33PM

    I recreated a new project.
    If I only put Input System Package, the menus work only in Mouse and keyboard, if I put Simulator by choosing a smartphone, the menu doesn't work. That's why in my other project I put Both.

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.