Deactivate on Hidden not respected at startup

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Deactivate on Hidden not respected at startup

Post by VoodooDetective »

I just noticed that all our Subtitle panels deactivate when the game starts. I think it's this code doing it:

DialogueSystemController.WarmUpConversationController()

Code: Select all

var standardDialogueUI = abstractDialogueUI as StandardDialogueUI;
 if (standardDialogueUI != null) standardDialogueUI.conversationUIElements.HideImmediate(); <---
controller.Close();
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Deactivate on Hidden not respected at startup

Post by Tony Li »

Is that an issue? In version 2.2.22, I'll add an option to not hide the UI when running the preload/warmup routine.
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Deactivate on Hidden not respected at startup

Post by VoodooDetective »

It's not a big deal, just something I noticed. It would be great to have that option. I'm in the middle of optimization and have found that disabling complex UI can be very expensive on re-enable. Better to leave it in memory sometimes.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Deactivate on Hidden not respected at startup

Post by Tony Li »

Okay, I'll add an option.

BTW, if relayout speeds are a concern, you could override HideImmediate to disable the Canvas component instead. You'll also want to override Open to re-enable the Canvas in that case.
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Deactivate on Hidden not respected at startup

Post by VoodooDetective »

Thanks very much, and will do! Thanks for the suggestion!
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Deactivate on Hidden not respected at startup

Post by VoodooDetective »

Hey there, sorry to bug you again. I just upgraded to 2.2.22 and when I checked "Don't Hide Immediate During Warmup" it still closes all the UI. Is there some extra step to making that work?

I've also got Warmup set to "On". When I set it to "Extra" it leaves only one subtitle menu open, and the rest closed. If I set it to "Off" then all the panels are still disabled on startup.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Deactivate on Hidden not respected at startup

Post by Tony Li »

Hi,

Try setting it to "Off". Then inspect the dialogue UI's StandardDialogueUI component and tick Conversation UI Elements > Don't Deactivate Main Panel.

If you also need the subtitle panels and/or response menu panels to stay open, let me know. That'll require an update.
VoodooDetective
Posts: 222
Joined: Wed Jan 22, 2020 10:48 pm

Re: Deactivate on Hidden not respected at startup

Post by VoodooDetective »

Huh, weird! My DialogueUI says that checkbox it ticked. I tried setting the warmup to off and have the same result. I don't need them to remain open, but to not deactivate on startup. So remain closed, but don't deactivate.

It's probably not a huge deal, it just saves the initial UpdateBatches() from happening during gameplay. I'm working on optimizations at the moment.
User avatar
Tony Li
Posts: 22158
Joined: Thu Jul 18, 2013 1:27 pm

Re: Deactivate on Hidden not respected at startup

Post by Tony Li »

Got it. Then if you set warmup to On, or even Extra, and tick Don't Deactivate Main Panel, it should work.
Post Reply