Animated Text Widgets
Texturge provides two UMG widgets for plain text and rich text usage paths respectively, both extending the engine’s built-in widgets with per-character animation capabilities.
Widget Comparison
UAnimatedTextBlock | UAnimatedRichTextBlock | |
|---|---|---|
| Inherits | UTextBlock | URichTextBlock |
| Animation config | TextAnimationBlueprint | AnimationData (DataAsset) |
| Text type | Plain text | Rich text (with inline animation tags) |
| Animation count | Single animation | Multi-animation blending (matched by tag) |
| Style system | UTextBlock style properties | URichTextBlock style set + decorators |
| Use case | Simple typewriter, title entrance | RPG dialogue, multi-effect blended text |
UAnimatedTextBlock
Properties
| Property | Type | Description |
|---|---|---|
TextAnimationBlueprint | UTextAnimationBlueprint* | Animation blueprint asset driving the per-character animation |
bAutoPlay | bool | Auto-play on construction (default false) |
bLoopPlayback | bool | Auto-restart from beginning after animation ends (default false) |
Blueprint Bindable Delegates
| Delegate | Signature | Description |
|---|---|---|
OnCharacterRevealedBP | (int32 RevealedCount) | Broadcast each time a character is revealed, parameter is the current total revealed count |
OnAnimationCompleteBP | () | Broadcast when the animation fully completes |
Playback Control API
UFUNCTION(BlueprintCallable)
void Play(); // Start character-by-character reveal animation
void Pause(); // Pause
void Resume(); // Resume
void Stop(); // Stop and reset
void SkipToEnd(); // Skip animation, directly show all text
bool IsAnimating(); // Whether currently playing
Internal Architecture
UAnimatedTextBlock internally holds a UTextAnimator instance (Animator), creating the custom Slate widget SAnimatedTextBlock in RebuildWidget(). This Slate widget overrides OnPaint() to read per-character frame data from Animator->GetCurrentFrameDataArray() and render each glyph with its individual transform applied.
The widget also listens for the following external events:
- Language switch: When
ULocalizationSubsystem::OnLanguageChangedis received, re-executes the pipeline to adapt to the new language’s text length. - Blueprint compilation: When the
TextAnimationBlueprintis recompiled, refreshes theAnimator’s built-inAnimInstance.
UAnimatedRichTextBlock
Properties
| Property | Type | Description |
|---|---|---|
AnimationData | UTextAnimationDataAsset* | Animation data asset defining tag-to-blueprint mappings |
bAutoPlay | bool | Auto-play on construction |
bLoopPlayback | bool | Loop playback |
Workflow
- Create a
UTextAnimationDataAsset, add animation entries (FAnimationEntry) to theEntriesarray - Each entry contains a
TagNameand aType(correspondingUTextAnimationBlueprint) - In rich text, wrap text segments with
<TagName>text content</>to apply animations - Assign
AnimationDatato theUAnimatedRichTextBlock, set the text, and play
Tag Syntax
Texturge uses the custom FTagParser, supporting two tag formats:
<!-- Format 1: Direct TagName matching (legacy compatible) -->
<Wave>This text will use the Wave animation</>
<!-- Format 2: id attribute matching (recommended) -->
<anim id="Wave">This text will also use the Wave animation</>
</>auto-closes the most recently opened tag<img id="..." />self-closing tag (decorator), whereidmatches aRowNamein theRichImageRowdata table used byURichTextBlockImageDecorator
The engine’s rich text style tags (defined in the RichTextStyleSheet data table as RichTextStyleRow entries, e.g. <b>, <i>) can be freely mixed with Texturge animation tags.
NOTE
UE5 rich text only supports
</>for closing tags —</TagName>is not valid. Colors are applied through the style sheet, not inline<color>attributes.
Playback Control API
Same as UAnimatedTextBlock: Play() / Pause() / Resume() / Stop() / SkipToEnd() / IsAnimating().
Internal Architecture
UAnimatedRichTextBlock internally uses the SAnimatedRichTextBlock Slate widget. The key difference in the RichText path is the render-tree-driven multi-layer animation system — each animation tag maps to an independent UTextAnimInstance. FRichTextMarshaller replaces standard FSlateTextRun with FTextRun during text layout construction, enabling every text run to read the animator’s frame data and apply per-character transforms.
Decorator Proxy
Texturge provides FDecoratorProxyRun for inline decorators (such as images) in the RichText path, ensuring decorator placeholders don’t affect plain text index mapping. This preserves correct animation frame data array indexing — decorators in the text (like image characters) don’t consume frame data indices.