Page 1 of 1

Not re-selecting first response button after pause

Posted: Thu Jan 06, 2022 2:35 am
by baxta86
Hi Tony,

I have noticed when I un-pause my game while I have a conversation active, the first response button is always re-selected after resuming play from the pause menu. This is so even if the user had say the second or third response button selected when they initially paused.

Is there a fix so that if the user pauses the game while the second response button is currently selected for example, that when they un-pause the game, the second response button is then reselected?

Im pausing by setting the Time.timeScale to 0 and my pause menu takes focus while paused. I assume because the conversation is not in focus during the pause and resumes focus after, it is resetting the button selection to the first response.

Cheers
Tom

Re: Not re-selecting first response button after pause

Posted: Thu Jan 06, 2022 9:14 am
by Tony Li
Hi,

Please try this patch:

PixelCrushers_UIPanelPatch_2022-01-06.unitypackage

It adds an improvement where Dialogue System UI panels will re-focus the formerly selected button (and not just the first button) after opening and closing a non-Dialogue System UI.

Re: Not re-selecting first response button after pause

Posted: Thu Jan 06, 2022 4:37 pm
by baxta86
Thanks Tony,

Sorry if this is a silly question, but where should i place the patch in my project? In the actual Project folder? the ProjectSettings folder? Or within the Pixel Crushers folder?

Cheers

Re: Not re-selecting first response button after pause

Posted: Thu Jan 06, 2022 4:42 pm
by Tony Li
Hi,

Download PixelCrushers_UIPanelPatch_2022-01-06.unitypackage. It doesn't matter where.

Then open your project in Unity. Select menu item Assets > Import Package > Custom Package and select the copy of PixelCrushers_UIPanelPatch_2022-01-06.unitypackage that you downloaded. Finally, click Import. This will update the Dialogue System's UIPanel script.

Re: Not re-selecting first response button after pause

Posted: Thu Jan 06, 2022 5:09 pm
by baxta86
Amazing! This works perfectly now :)

I did have to write a little script for On Open() in my UI to make it selected the first button when the conversations starts again (i have an option to close the dialogue and re-open the conversation again), but now when I pause and un-pause, it re-selects whichever response was selected when the pause was activated.

Thanks once again for you help Tony. Honestly the best support for an asset! Wish I could chuck you another 5 start review on the asset store, haha.

Re: Not re-selecting first response button after pause

Posted: Thu Jan 06, 2022 8:33 pm
by Tony Li
Glad to help! Thank you for the kind words. :-)

Re: Not re-selecting first response button after pause

Posted: Wed Feb 23, 2022 1:23 pm
by h0neyfr0g
hi Tony!

I added the package as instructed, but Im now getting an error saying

"SetFocus" does not exist and is throwing an error

Thanks for the help!

Re: Not re-selecting first response button after pause

Posted: Wed Feb 23, 2022 1:25 pm
by Tony Li
Hi,

That patch is for an older version of the Dialogue System. Please try importing the latest version.