Dialogue System not registering mouse clicks in HTML

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
FishFern
Posts: 4
Joined: Mon Sep 26, 2022 10:40 am

Dialogue System not registering mouse clicks in HTML

Post by FishFern »

Hi Everyone,

I have come across a strange issue when building my project to HTML, as for some reason, Dialogue System does not seem to register mouse clicks. For example, I am using a continue button to advance dialogue, and have branching dialogue choices, however neither can be selected. This causes dialogue passages to become stuck. The mouse interactions work elsewhere, so it seems to be something with Dialogue System, rather than the project at large. The strange thing is that this doesn't happen when playtesting in Unity, it only occurs once the game has been exported/built to HTML format.

I looked through some of the documentation, and tried enabling 'Force Module Active' on the Event System input, however this didn't help either.

Any help is greatly appreciated, I have no clue what's causing this! :)
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System not registering mouse clicks in HTML

Post by Tony Li »

Hi,

Does the problem occur in the Unity editor's play mode if you start play from the first scene in your project's build settings?

If so, check the configuration of the Dialogue Manager in that scene. Maybe its Canvas is missing a Graphic Raycaster or something.

If that doesn't help, can you send a reproduction project to tony (at) pixelcrushers.com?
FishFern
Posts: 4
Joined: Mon Sep 26, 2022 10:40 am

Re: Dialogue System not registering mouse clicks in HTML

Post by FishFern »

Hi Tony,

Oh my, your answer helped, as it made me realise a fatal error on my part; I totally neglected to factor canvas rendering order/order into the hierarchy into the equation. Turns out I had a second UI canvas that sat on top of the Dialogue System UI, which blocked all of the raycasting! Once I flipped around the hierarchy, and adjusted the sort order it's working fine. Massive oversight on my part!

Thanks so much for your reply though, it was actually your suggestion about playing from the first scene that tipped me off, because it had me wondering if ordering was an issue!

Thanks again for your help!

I hope you have a good one! :)
User avatar
Tony Li
Posts: 21973
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System not registering mouse clicks in HTML

Post by Tony Li »

Hi,

I'm glad you were able to get to the bottom of it! :-)
Post Reply