Page 1 of 1

Deselect Issue Upgrading to 2.2.35.

Posted: Sat Mar 18, 2023 4:15 pm
by Unrighteous
Hello, I just downloaded the latest version of Dialogue System for Unity today (2.2.35).

There are a bunch of new features that I'm really enjoying, and everything in the editor has been working great so far. Unfortunately, I really should have tested how everything functioned in play mode before writing dialogue for a few hours (oops! but of course, I can just copy the database over to a backup, so no big deal).

Upgrading my project gives me an odd behavior where a second after the response menu pops up, the currently selected response is deselected and reselected (so it goes dark and the lights up again). This doesn't mess with functionality in any way I could see, it just doesn't look very good. This is 100% reproduceable when upgrading my project.

Unfortunately, I was unable to reproduce this in a new project. I tried a few different things (using Rewired, messing with settings, etc...), but I couldn't figure out the issue. I've made so many little changes here and there in my main project, that testing everything would take ages.

Any ideas what this could be?

Upgraded from 2.2.33 to 2.2.35
Unity 2020.3.43f1

Thank you.

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Sat Mar 18, 2023 7:44 pm
by Tony Li
Hi,

Is something else perhaps stealing the EventSystem's selection (aka focus)? It might even be something as simple as clicking away from the UI.

You might be able to visibly eliminate this issue by setting the response menu panel's Focus Check Frequency to a lower value such as 0.01. When Focus Check Frequency is non-zero, the response menu will check the current selection at this frequency in seconds. If a menu button isn't currently selected, it will reselect the most recently selected menu button.

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Sun Mar 19, 2023 12:06 pm
by Unrighteous
Thanks for the focus suggestion, don't know why it didn't occur to me to mess with that earlier.

Unfortunately, even with an extremely low focus check frequency, there's still an inevitable slight visual flicker, and I wanted to figure out what was causing the loss of focus.

Fortunately, I did figure it out! I set the focus check frequency to a higher number so I could what was taking focus away from the response menu (duh, should've done this much earlier), and it turned out to be the subtitle continue button. So... I started messing with various options again.

I had changed the subtitle panel to Visibility to "Only During Content" because I use semi-transparent panels and don't want the subtitles panel and response panels overlapping. Changing the Visibility back to "Until Superceded" fixed the issue (don't know why). However, I need to hide the subtitle panel during the response selection, so I reverted that and started messing with other stuff.

Very strangely, unticking "Select Previous On Disable" for the subtitle panel (Standard UI Subtitle Panel) completely fixes the issue with no other changes required. I have no idea why this is, and it doesn't really make sense to me, but it just works now.

I'll definitely try to reproduce this in a new project when I have some time, but this workaround is good enough for me. I can always code something to reselect stuff if I need to, so I don't need the "Select Previous On Disable" option ticked.

To give a bit of additional info, the deselect/reselect doesn't occur on the first response in every conversation, but does in some conversations. I couldn't find any consistency in this.

Anyway, I'm good for now. I'll let you know if I find a consistent repro once I test this in a new project.

Thanks for you help!

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Sun Mar 19, 2023 12:36 pm
by Tony Li
Hi,

Hmm, I'll check this, too. When the response menu panel becomes active, it should be the "top" UI panel, so panels below it (such as the subtitle panel) shouldn't also try to steal focus.

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Sun Mar 19, 2023 1:04 pm
by Unrighteous
Hello again,

I actually managed to reproduce this in a new project. It seems to have something to do with the "Always Force Response Menu" option being unticked in the "Input" section.

Although, I'm not 100% sure, I'm having trouble reproducing it consistently across different new projects.

If you like, I can give you a project with a repro (it's consistent in this project). It just has the dialogue system installed with 2D Core, nothing else.

Let me know if you want that project, and how I should give it you.

Thanks again.

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Sun Mar 19, 2023 3:18 pm
by Tony Li
Hi,

That would be great; thank you. Please send the reproduction project to tony (at) pixelcrushers.com

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Mon Mar 20, 2023 9:04 am
by Tony Li
Thanks for putting together the clear repro project.

A quick solution is to UNtick the subtitle panel's Select Previous On Disable checkbox. The issue is that the subtitle panel is selecting its continue button when it's disabled (at the end of the hide animation), but the response menu panel is still in the process of playing it show animation. By unticking the checkbox, you avoid the issue.

I'll address this in version 2.2.36 so that you can still have the checkbox ticked.

Re: Deselect Issue Upgrading to 2.2.35.

Posted: Mon Mar 20, 2023 10:57 am
by Unrighteous
Thanks for looking into this so quickly.

Yeah, I've been keeping "Select Previous On Disable" unticked and everything's been working great. Don't really need it, but still nice to know that I'll be able to use it in the next update.

Thanks again!