[HOWTO] How To: Adjust Typewriter Speed

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

[HOWTO] How To: Adjust Typewriter Speed

Post by Tony Li »

This post explains how to set the typewriter speed.

First, make sure you can edit your dialogue UI. You can edit the dialogue UI prefab directly, but you may find it easier to add an instance of the dialogue UI to your scene. Drag it into the Dialogue Manager's Dialogue UI field. If the Dialogue System asks if you want to add an instance, click the Add Instance button:

setTypeSpeed1.png
setTypeSpeed1.png (134.52 KiB) Viewed 1480 times

OR:
If the same dialogue UI prefab is already assigned to the Dialogue UI field, it will not ask this. Instead, manually add the dialogue UI to the Dialogue Manager's Canvas, and manually assign it to the Dialogue UI field:

setTypeSpeed1b.png
setTypeSpeed1b.png (106.61 KiB) Viewed 1480 times

Next, expand the dialogue UI until you can see the Subtitle Text GameObject in the subtitle panel that you want to change. Set the typewriter effect's Characters Per Second to a higher number to make it type faster. Set it to a lower number to make it type slower:

setTypeSpeed2.png
setTypeSpeed2.png (65.08 KiB) Viewed 1480 times

Note that this value is different from the Dialogue Manager's Subtitle Settings > Subtitle Chars Per Second:

setTypeSpeed3.png
setTypeSpeed3.png (112.49 KiB) Viewed 1480 times

Subtitle Chars Per Second and Min Subtitle Seconds specify how long the subtitle will stay onscreen. Subtitle Chars Per Second should never be higher than the typewriter's Characters Per Seconds. Otherwise the subtitle will disappear before the typewriter has finished. For more information about Subtitle Chars Per Second, see the Cutscene Sequences Tutorials.


Additional Note:
Normally the continue button jumps to the end of the text if the typewriter is still typing. If the typewriter is done typing, it continues to the next stage in the conversation. If you want the continue button to speed up the typewriter instead of jumping to the end of the text, see this post.


Changing Speed:
If you want to instantly display parts of text, you can use RPG Maker-style control codes in your text.

If you need to speed up or slow down text while typing, this example combines custom speedup scripts with the multiple subtitle panels in the WRPG template discussed in this thread:

WRPGPanelsWithTypewriterSpeedup_2022-11-02.unitypackage

Summary of the changes:
  • Put a separate continue button in each subtitle panel.
  • Add one StandardUIContinueButtonSpeedUp script to each continue button. Assign the panel's typewriter effect.
  • Add multiple ResetTypewriterSpeed scripts to the dialogue UI GameObject, one for each subtitle panel. Assign the panel's typewriter effect.
Post Reply