Hi Tony, we are currently crunching to try and get a new build out in time for Tribeca late submissions, so I'm setting up a system where we can easily switch between different dialogue templates for different fx.
It mostly works. However, I have some templates that have things like pop in animations subscribed to conversation start and stop dialogue events. This causes them to pop on screen even when they are not the current DialougeUI
I'm trying to set up a guard clause to prevent this from happening when they are not the active dialogue
Is there a good way to implement what I'm trying to do here (unsuccessfully)?
Checking if Dialogue UI is Current Dialogue UI
-
- Posts: 21
- Joined: Mon Nov 27, 2023 8:28 pm
Re: Checking if Dialogue UI is Current Dialogue UI
Hi,
Are you using entirely different dialogue UIs?
If so, you can check DialogueManager.standardDialogueUI. But perhaps the dialogue UI itself should be taking care of its pop-in animations.
If the dialogue UI is part of the Dialogue Manager's hierarchy, it will get OnConversationStart(Transform) and OnConversationEnd(Transform) messages. Otherwise you can hook into the C# events DialogueManager.instance.conversationStarted and conversationEnded. Or override the StandardDialogueUI class's Open() and Close() method to do your extra animation.
Are you using entirely different dialogue UIs?
If so, you can check DialogueManager.standardDialogueUI. But perhaps the dialogue UI itself should be taking care of its pop-in animations.
If the dialogue UI is part of the Dialogue Manager's hierarchy, it will get OnConversationStart(Transform) and OnConversationEnd(Transform) messages. Otherwise you can hook into the C# events DialogueManager.instance.conversationStarted and conversationEnded. Or override the StandardDialogueUI class's Open() and Close() method to do your extra animation.
-
- Posts: 21
- Joined: Mon Nov 27, 2023 8:28 pm
Re: Checking if Dialogue UI is Current Dialogue UI
Hi Tony, we are using entirely separate UI for different FX throughout the game. Your suggestion was what I was looking for, although in turned out I had checked "Don't Deactivate Main Panel" for some reason. I unchecked it and now it is never visible when its not being used, so problem solved.