[HOWTO] How To: Continue With Special Key/Button

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

[HOWTO] How To: Continue With Special Key/Button

Post by Tony Li »

Conversations can be configured to require a continue button click to advance.
  • To set the continue button mode for all conversations, inspect the Dialogue Manager GameObject's Display Settings > Subtitle Settings and set the Continue Button dropdown to a value such as Always.
  • You can also set it on a per-conversation basis by inspecting a conversation's properties in the Dialogue Editor window and ticking Override Display Settings > Subtitle Settings.
  • And you can change the continue button mode in the middle of a conversation using the SetContinueMode() sequencer command.
Note: Your dialogue UI's subtitle panel(s) should have continue buttons. The prefabs that ship with the Dialogue System all have continue buttons. You can configure continue buttons to advance immediately by setting their OnClick() events to call the subtitle panel's OnContinue() method, or add a StandardUIContinueButtonFastForward component and configure OnClick() to call OnFastForward() to make it fast-forward the typewriter effect if it's still typing or advance the conversation if it's done typing.

If you're using a joystick or keyboard (i.e., Dialogue Manager's Input Device Manager component > Input Device is set to Joystick or Keyboard) -- or if you've ticked the Input Device Manager's Always Auto Focus checkbox -- the subtitle panel will keep the continue button focused (i.e., selected) so that pressing the EventSystem GameObject's Submit input will click it. By default, the Submit input is assigned to the Space and Enter keys and joystick button 0. If you're using Unity's built-in input manager, you can assign other keys or joystick buttons using Edit > Project Settings > Input. Note that this will apply to all Unity UI interaction.

If you want to map a hotkey or button specifically to the continue button, add a UI Button Key Trigger component. Assign a key and/or input button name. When that key/input button is pressed, it will click the UI button.

Note: When using a joystick or keyboard, or if Always Auto Focus is ticked, the Dialogue System will keep focus on the continue button, or a response button if it's currently showing a response menu. If you open your own UI, such as a pause menu, at this time, the Dialogue System will steal focus away from your UI. To prevent this, see this article.
Post Reply