Auto Focus Issue (Continue Button and Response Menu)

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Auto Focus Issue (Continue Button and Response Menu)

Post by Saruto »

Hello,

I realized that it's been a while since I've updated, so I just updated my Dialogue System from version 1.6.6.1 to the most recent 1.7.0. However, this seems to have broken something relating to Auto Focusing. Before the update, I had used the Auto Focus feature in my Unity UI Dialogue UI, and had Continue Button set to Always in the Dialogue System Controller gameobject. The flow seemed to make sense; it would focus on the assigned Continue Button for all my subtitles (all of my subtitles have the same one), then when the response menu would show up, it would change focus to the first response of the menu, then after the player chose a response, it would focus back onto the Continue Button. I don't believe the Allow Steal Focus feature was available in 1.6.6.1.

However, after the update, this no longer seems to work. After starting a conversation with Auto Focus on and Allow Steal Focus off, the dialogue system would not focus onto the Continue Button; it would not change the EventSystem.current.currentSelectedGameObject from Null to Continue Button. With both Auto Focus and Allow Steal Focus on, the conversation would focus on the Continue Button like expected. However, when the response menu appears, it shifts focus to the first response like expected, but after a few moments (the exact time corresponding to the Auto Focus Check Frequency field), it shifts the focus back onto the Continue Button, meaning that you could no longer navigate the response menu and would be stuck at that point in the conversation.

If I had to guess, the problem may relate to the fact that I have Continue Button set to Always, but I am still confused as to why Auto Focus seems to do nothing at all unless Allow Steal Focus is also on. Is this potentially a bug? Also, if this is related to the Continue Button field, which setting should it be on for the desired behavior that I had in 1.6.6.1? There are a lot of options that seem subtly different, and I'm not sure which one to pick, if that is indeed the cause of the issue.

Thanks for your help.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto Focus Issue (Continue Button and Response Menu)

Post by Tony Li »

Hi,

I'll look into this and reply back soon. (Under the hood, in 1.7.0 the auto focus code changed to call the button's Select() and OnSelect() methods, instead of manually calling EventSystem.current.SetSelectedGameObject(button) which didn't properly change the hover states [e.g. tinting] of buttons.)

Have you ticked "Always Visible" on your UI? This sounds like it might be a bug with the Allow Steal Focus feature.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Auto Focus Issue (Continue Button and Response Menu)

Post by Saruto »

Hey Tony,

Ahh, I see. My buttons don't use Unity's transition animations for hovering and stuff, which is why I never even noticed that as a problem.

And no, Always Visible is unticked for both my PC and NPC subtitles. Just to let you know, both subtitles use the exact same game objects for everything (specifically the Line, Portrait Image, Portrait Name, and Continue Button are the same for both, while Panel is unassigned for both).

Thanks again for your help.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto Focus Issue (Continue Button and Response Menu)

Post by Tony Li »

Hi,

Sorry, that is indeed a bug due to incorrect logic if panels aren't assigned. I'll post a bug fix here later today.
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Auto Focus Issue (Continue Button and Response Menu)

Post by Tony Li »

Hi,

Thanks for reporting this bug. You can download the fix here or on the Dialogue System Extras page. I set up a few test cases, and the fix passed all the test cases. It should be pretty solid now, but if you come across a case where it doesn't work as expected please let me know.
Saruto
Posts: 24
Joined: Sat May 09, 2015 2:21 pm

Re: Auto Focus Issue (Continue Button and Response Menu)

Post by Saruto »

Heya,

Awesome, just downloaded the patch and everything seems to be working perfectly, just like how it was before! Once again, the support for this asset has been incredible! Definitely the best purchase I've made on the asset store. :D

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

Re: Auto Focus Issue (Continue Button and Response Menu)

Post by Tony Li »

Thanks! Happy to help!
Post Reply