Disable or hide dialogue canvas & pause interactions during a cutscene

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
ramboaslak
Posts: 11
Joined: Fri Feb 17, 2023 5:49 am

Disable or hide dialogue canvas & pause interactions during a cutscene

Post 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.
User avatar
Tony Li
Posts: 22135
Joined: Thu Jul 18, 2013 1:27 pm

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

Post 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 159 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.
Post Reply