Text Effects (TMP)
Combine typewriter, motion, and color effects on TMP text
Overview
Text Effects composes character effects on TextMesh Pro text. It supports typewriter reveal, scramble decoding, palette coloring, alpha pulse, shimmer, wave, bounce, shake, glitch, pulse, swing, and wiggle.
Usage
Add Text Effects beside a TMP text component.
Enable the effects you want.
Choose Entire Text or Tagged Characters for each effect.
Customization
Tagged Spans
For a tagged effect, wrap the relevant words in its matching tag, such as <wave>these words</wave>. Enable the effect and set its scope to Tagged Characters; the tag alone does not enable it. Effects can overlap. TMP rich-text processing must be enabled for tags.
Typewriter
Typewriter settings include characters per second, start delay, punctuation delay, and optional audio. Use Use Unscaled Time for dialogue or menus that continue while gameplay is paused.
Scramble
Scramble swaps characters for random ones that settle into the real text. It sits under Playback, next to Typewriter. With Play On Enable, it starts when the component is enabled; otherwise call PlayScramble().
- One Shot decodes the text once over Duration, after Start Delay.
- Continuous keeps scrambling the share of characters set by Intensity, with readable pauses of Rest Duration between bursts. A Rest Duration of
0scrambles without pauses. - Reveal Order settles characters left to right, right to left, or at random, and Stagger spreads the settling across the duration. Frequency sets how many times per second a character changes.
- Characters lists the replacement characters. Only characters in the text's font atlas are used, and spaces, punctuation, and sprites stay as they are. Seed changes the random pattern.
Public API
Use TextEffects in the Evo.UI namespace.
Settings such as Wave, Typewriter, and Palette are configurable objects returned by read-only properties. Call Refresh() after editing them when you need a fresh evaluation.
Properties
| Name | Type | Description |
|---|---|---|
TextComponent | TMP_Text | Attached TMP text component. |
IsTyping | bool | Whether the typewriter is playing. |
IsScrambling | bool | Whether the scramble is playing. |
UseUnscaledTime | bool | Uses unscaled effect timing. |
Typewriter | TypewriterFX | Typewriter settings. |
Scramble | ScrambleFX | Scramble settings. |
Palette | PaletteFX | Gradient palette settings. |
AlphaPulse | AlphaPulseFX | Alpha pulse settings. |
Shimmer | ShimmerFX | Shimmer settings. |
Wave | WaveFX | Wave settings. |
Bounce | BounceFX | Bounce settings. |
Shake | ShakeFX | Shake settings. |
Glitch | GlitchFX | Glitch settings. |
Pulse | PulseFX | Scale pulse settings. |
Swing | SwingFX | Swing settings. |
Wiggle | WiggleFX | Wiggle settings. |
Methods
| Name | Parameters | Description |
|---|---|---|
SetText() | string value, bool startTypewriter = false, bool startScramble = false | Sets source text and optionally starts the typewriter or the scramble. |
PlayTypewriter() | None | Starts revealing the current text. |
SkipTypewriter() | None | Reveals the rest immediately. |
PlayScramble() | None | Starts scrambling the current text. |
SkipScramble() | None | Stops scrambling and shows the real text. |
Refresh() | None | Requests a fresh effect evaluation. |
Example
using UnityEngine;
using Evo.UI;
public class TextEffectsExample : MonoBehaviour
{
[SerializeField] private TextEffects target;
private void Start()
{
target.Wave.enabled = true;
target.Wave.scope = TextEffects.EffectScope.TaggedCharacters;
target.Typewriter.enabled = true;
target.Typewriter.speed = 35f;
target.SetText("Welcome to <wave>Evo UI</wave>.", true);
}
}