Clicked Button Not Selecting Option

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
kenlem
Posts: 26
Joined: Sun Aug 16, 2020 5:19 pm

Clicked Button Not Selecting Option

Post by kenlem »

Hi,

I'm working on integrating DSU with Hurricane VR.

I have Hurricane working properly with a simple Unity gui where is can select buttons and check/uncheck check boxes. That part looks fine.

I set up a world space gui with a conversation. Everything looks fine. I can highlight buttons by pointing over them. When I select a button, it changes visibly so that it looks like it has been clicked but the option doesn't seem to get selected to advance the dialogue.

I also add an event on the sample response button to show a debug message when the button has been clicked. That works. The button is actually being clicked. Any suggestions on what I might have missed?

Thanks.
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clicked Button Not Selecting Option

Post by Tony Li »

Hi,

It's probably the debug event. If the Button component's OnClick() has one or more design-time events, the StandardUIResponseButton will not automatically add a StandardUIResponseButton.OnClick event at runtime. Try adding it manually. Example:
responseButtonOnClick.png
responseButtonOnClick.png (70.29 KiB) Viewed 350 times
kenlem
Posts: 26
Joined: Sun Aug 16, 2020 5:19 pm

Re: Clicked Button Not Selecting Option

Post by kenlem »

I followed your instructions but that didn't work.

Trying to think what to look at next. Any suggestions?
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clicked Button Not Selecting Option

Post by Tony Li »

Hi,

Do your response buttons use the Standard UI Menu Panel component's Button Template, or are they design-time buttons assigned to the Buttons list?

Are there any errors or warnings in the Console window? (Make sure your Console isn't inadvertently filtering out errors or warnings.)
kenlem
Posts: 26
Joined: Sun Aug 16, 2020 5:19 pm

Re: Clicked Button Not Selecting Option

Post by kenlem »

I'm using the Standard UI Menu Panel prefab with no changes. Demo database with Private Hart conversation.

I have logging set to info. I don't see any warnings or errors.

I do see that Response button at runtime doesn't have any method listed under the On Click() event. Should it?

I did create a new prefab from the standard one and manually hooking up the OnClick event of the response button to the Standard UI Response button and that didn't work again.
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clicked Button Not Selecting Option

Post by Tony Li »

Can you send a reproduction project to tony (at) pixelcrushers.com?
User avatar
Tony Li
Posts: 22037
Joined: Thu Jul 18, 2013 1:27 pm

Re: Clicked Button Not Selecting Option

Post by Tony Li »

Thanks for sending the reproduction project. I replied back. When you interact with a Button in Hurricane VR, it executes a PointerClick event, but it doesn't execute the standard Submit event. The solution is to add an Event Trigger whose Pointer Click event calls StandardUIResponseButton.OnClick.
Post Reply