1️⃣ You're browsing the documentation for version 1.X. If you want to check version 2.X instead, please go here. 1️⃣


Text Animator Players

You can use TextAnimatorPlayers to show and hide letters dynamically (like a typewriter), choosing different pauses for any kind of characters (punctuation, letters, […]), trigger events and more.


Showing Text

You can tell TextAnimator to use the typewriter in two ways.

Replacing “tmproText.text = textValue;” with textAnimatorPlayer.ShowText(textValue); in your code (referencing a TextAnimatorPlayer component).

B) Via the “Easy Integration”

Enabling the “Use Easy Integration” option in the TextAnimator component.
This will let the plugin automatically check for text changes from your TextMeshPro’s component.

textanimator component easy integration option

tmpro box text changes

Extra Methods

You can pause the typewriter at any time by invoking textAnimatorPlayer.StopShowingText(), and you can start/resume it by invoking textAnimatorPlayer.StartShowingText().


Hiding Text

You can hide letters dynamically via script, by invoking textAnimatorPlayer.StartDisappearingText(), and you can also stop it at any time by invoking textAnimatorPlayer.StopDisappearingText().


You can create your own typewriter (read here how to create a custom typewriter via C#) or you can use the built-in one.

Built-in typewriter (TextAnimatorPlayer.cs)

The default typewriter component is called TextAnimatorPlayer.
You can hover the mouse above its fields in the Inspector to show the tooltips for each option/feature, but here’s a quick look in this page as well.


Typewriter Settings

textanimator player use typewriter

  • Use Type Writer: true if you want to show text dynamically, like a typewriter.
    👍🏻 The typewriter timescale will match the relative TextAnimator component one.

textanimator player typewriter settings.jpg

  • Start Typewriter Mode: tells the typewriter when to start showing letters.
  • Reset Typing Speed At Startup: true if you want the typewriter’s speed to reset back to 1 every time a new text is show, otherwise it will save the last one used.
  • Can Skip Typewriter: true if you want to enable the user to skip the typewriter (e.g. by calling TextAnimatorPlayer.SkipTypewriter()).
  • Hide Appearances On Skip: true if you want to prevent appearance effects from playing whenever the typewriter skips
  • Trigger Events On Skip: true if you want to trigger all remaining events once the typewriter skips

Events

You can trigger events based on the typewriter activity (example: when it just ended showing text).

textanimator player events.jpg

  • OnTextShowed: event called after the entire text has been shown (if you’ve set “Use Typewriter” to true, it will wait until all letters are shown).
  • OnTextDisappeared: called as soon as the script starts hiding the last letter.

The following below only work if the “use typewriter” is set to true:

  • OnCharacterVisible(char x): called each time a character became visible.
  • OnTypewriterStart: called right before the typewriter starts showing its first letter.
    It doesn’t work if the typewriter is off, since it would coincide with the “OnTextShowed” event (in this case you can use that one instead)

Set different pauses

textanimator player typewriter wait.jpg

  • Wait for:
    • Normal chars: any letter that is not puntuaction.
    • Long: ‘!’, ‘?’, ‘.
    • Middle: ‘,’, ‘;’, ‘)’,’:’,’-
  • AvoidMultiplePunctuactionWait
    • If true, only the last punctuation on a sequence waits for its category time.
      Example: “I’m bored……” → all dots will have a “normal” wait, except for the very last dot of the sequence, which will have a “long” wait.
    • If false, each punctuation will wait regardless if it’s in a sequence or not.
      Example: “I’m bored……” → each single dot will have a “long” wait
  • Wait For New Lines: true if you want the typewriter to wait for “new lines” characters as well, like \n.
  • Wait For Last Character: true if you want to wait for the last character of the text as well (e.g. a dot).

Disappearances

textanimator player disappearance settings.jpg

  • Disappearance Orientation: The direction that disappearing letters will follow.
    • Same As Typewriter: The same direction as the typewriter, e.g. “left to right”.
    • Inverted: Opposite direction than the typewriter, e.g. if your text is set “left to right”, the letters will start disappearing from “right to left”.
  • Use Typewriter Wait Times: true if you want to have a “disappearance” speed that follows the same rules as the typewriter (e.g. waiting for puntuaction, different types of characters etc.).
    • if true, you will edit the Typewriter Speed Multiplier: Multiplies the base typewriter speed (e.g. setting it to “0.5” will start hiding letters twice as slow than they get shown).
    • if false, you will edit the Disappearances Wait: Sets a “wait time” for all characters.
End of the page. Go back to the Documentation Index.