Page 1 of 1

Clicked Button Not Selecting Option

Posted: Sun May 23, 2021 7:58 pm
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.

Re: Clicked Button Not Selecting Option

Posted: Sun May 23, 2021 8:13 pm
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 379 times

Re: Clicked Button Not Selecting Option

Posted: Mon May 24, 2021 7:16 am
by kenlem
I followed your instructions but that didn't work.

Trying to think what to look at next. Any suggestions?

Re: Clicked Button Not Selecting Option

Posted: Mon May 24, 2021 8:21 am
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.)

Re: Clicked Button Not Selecting Option

Posted: Mon May 24, 2021 9:20 pm
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.

Re: Clicked Button Not Selecting Option

Posted: Mon May 24, 2021 9:23 pm
by Tony Li
Can you send a reproduction project to tony (at) pixelcrushers.com?

Re: Clicked Button Not Selecting Option

Posted: Tue May 25, 2021 3:10 pm
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.