Click event not passing through to Adventure Creator Menu

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Click event not passing through to Adventure Creator Menu

Post by DragoonHP »

So I have this weird error where putting the DialogueManager in the script causes my navigation menu to not register clicks anymore. It's displayed but for some reasons, my clicks don't go through to the buttons. Disabling/removing it makes the Navigation menu work again. I'm on Unity2018.2 if that matters
Last edited by DragoonHP on Sun Feb 17, 2019 1:13 am, edited 1 time in total.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click event not passing through to Adventure Creator Menu

Post by Tony Li »

It's possible that the Dialogue Manager's Canvas is on top of your navigation menu's canvas and blocking mouse input.

If you're playing in the Unity editor, please reproduce the problem. When you get your game into that state, inspect the Dialogue Manager's Canvas and disable the Canvas component. Then check if you can click on your navigation menu. If you can, then re-enable the Canvas component and figure out which UI element is blocking input.

If that doesn't do it, check if the Dialogue Manager perhaps has an EventSystem somewhere in its hierarchy. Maybe it's being carried over from another scene and causing a conflict. The usual setup is to assume each scene has its own EventSystem instead of adding one as a child of a persistent object like the Dialogue Manager.
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: Click event not passing through to Adventure Creator Menu

Post by DragoonHP »

Once the game starts, it doesn't matter even if I disable the entire DialogueManager. The buttons continue to be unresponsive.

But I think I found why the buttons are unresponsive. For some reason, the Navigation menu Graphic Raycaster component is being set to inactive if DialogueManager is set to Active. Do you know what might be causing this?
I have two custom menus, but only the Navigation one is being affected by it.
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click event not passing through to Adventure Creator Menu

Post by Tony Li »

Untick the Dialogue Manager's Input Device Manager > Control Graphic Raycasters.

When this is ticked and the Input Device Manager's Input Device is Joystick or Keyboard, it disables graphic raycasters (the things that detect mouse input). This feature was requested to prevent the mouse from accidentally stealing UI focus when using a joystick or keyboard. In the next release, the default value of this checkbox will be unticked.
DragoonHP
Posts: 62
Joined: Tue Jan 15, 2019 8:17 am

Re: Click event not passing through to Adventure Creator Menu

Post by DragoonHP »

Thanks, that did it.
Sorry for all the questions v_v
User avatar
Tony Li
Posts: 22056
Joined: Thu Jul 18, 2013 1:27 pm

Re: Click event not passing through to Adventure Creator Menu

Post by Tony Li »

Great! I'm glad that worked.
Post Reply