TextTyper is a text typing effect component for Unity. TextTyper prints out characters one by one to a uGUI Text component. Adapted by RedBlueGames from synchrok's GitHub project (https://github.com/synchrok/TypeText).
It's easy to find other examples of Text printing components, but TextTyper provides two major differences:
Note this verison of TextTyper requires TextMeshPro, which can be installed for free from the Package Manager in Unity 2018, or the Asset Store in older versions. If you want the version that is compatible with Unity's uGUI Text component, this branch or download this release.
To start TextTyping all you need to do is add the TextTyper
component to a unity Text widget:
TypeText
and Skip
to print the desired text with the specified delay. We call these from a 3rd component we call Talker
.You can optionally subscribe to the PrintCompleted
and CharacterPrinted
UnityEvents to add additional feedback like sounds and paging widgets.
Mayday! <delay=0.05>S.O.S.</delay>
<b>,<i>,<size>,<color>,...
Image of TextTyper in Sparklite (© RedBlueGames 2016)
The core of our text typer is a coroutine that’s triggered via the TypeText method. The coroutine has the following steps: Check next character to see if it’s the start of a Rich Text tag
The tool also uses RichTextTag.cs, a class that’s used to help with parsing. There are a few details I left out, but this should give you enough to start reading through the code if you want to know more.
The easiest way to help with the project is to just to use it! As you use it, you can submit bugs and feature requests through GitHub issues.
Issue Resporters