Page 1 of 1

Disable or hide dialogue canvas & pause interactions during a cutscene

Posted: Fri Feb 17, 2023 5:53 am
by ramboaslak
Hello!

I have a situation where I need to hide the dialogue canvas & disable interactions (as well as the text flow to the dialog text box) during a five second long cutscene in the middle of a conversation. Currenty I've made it so that a Playmaker FSM is fired which plays out the short cutscene while disabling the canvas component of the dialog canvas, and after five seconds, when the cutscene is over, enables the component. The problem I have is that the text keeps flowing (I use the typewriter effect so the sound is also playing) and the player can advance the dialog when the panel is not showing. How should I go about fixing this? I'd like the conversation to pause, hide the canvas, wait for five seconds, show the canvas and then continue the dialogue. It seems like a trivial thing but I just can't wrap my head around on how to solve this.

Re: Disable or hide dialogue canvas & pause interactions during a cutscene

Posted: Fri Feb 17, 2023 10:06 am
by Tony Li
Hi,

You can pause the typewriter by calling its Pause() method -- or by pausing the entire Dialogue System with DialogueManager.Pause(). To tell the dialogue UI not to steal back input focus, see this post.

However, typically mid-conversation cutscenes are handled by empty nodes between other nodes, such as:

midConversationCutscene.png
midConversationCutscene.png (37.66 KiB) Viewed 162 times

In the example above, the empty node doesn't have any text, so there's no issue with the typewriter. I also used the SetDialoguePanel() sequencer command, although it's fine if you want to hide the canvas and temporarily disable input using the linked post above.