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 ?

«1

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 November 5

    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.

  • I do not have enough details to recreate the issue.

    If you'd like to PM me a .zip of a project that demonstrates the issue, with instructions, I will take a look.

  • Is it really a problem to be in Both ?

  • I doubt "Both" is the underlying issue, but I am not getting enough detail to understand the problem.

  • I don't have any more details. I also don't really understand why the button still works when the interactive box is not checked. There is only the graphics side so the pressed sprite is disabled.

  • I would need the project to understand the issue.

  • edited November 8

    If on your side you create the same thing as me: a menu that contains a button with flahhotspot input and a sound in clicksound and you put on the Onclick of the button an actionlist with menu change state off for 3s, does it work well for you ?

  • Setting the Menu state-change to "Hide Element"? Yes, it does.

  • No, turn the menu in turn off for 3s.

  • Your screenshots on the 2nd show it being hidden - has this changed?

    If I turn the Menu off for 3s, yes - it turns off.

  • As I told you, when I use hide it works, the menu is hidden but when I use turn off just to disable the menu, there is only the graphics side that is disabled (pressed sprite) but if you click on the button it still works and the sound is played while I have put Disable interactibility

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.