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

UAnimatedTextBlockUAnimatedRichTextBlock
InheritsUTextBlockURichTextBlock
Animation configTextAnimationBlueprintAnimationData (DataAsset)
Text typePlain textRich text (with inline animation tags)
Animation countSingle animationMulti-animation blending (matched by tag)
Style systemUTextBlock style propertiesURichTextBlock style set + decorators
Use caseSimple typewriter, title entranceRPG dialogue, multi-effect blended text

UAnimatedTextBlock

Properties

PropertyTypeDescription
TextAnimationBlueprintUTextAnimationBlueprint*Animation blueprint asset driving the per-character animation
bAutoPlayboolAuto-play on construction (default false)
bLoopPlaybackboolAuto-restart from beginning after animation ends (default false)

Blueprint Bindable Delegates

DelegateSignatureDescription
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::OnLanguageChanged is received, re-executes the pipeline to adapt to the new language’s text length.
  • Blueprint compilation: When the TextAnimationBlueprint is recompiled, refreshes the Animator’s built-in AnimInstance.

UAnimatedRichTextBlock

Properties

PropertyTypeDescription
AnimationDataUTextAnimationDataAsset*Animation data asset defining tag-to-blueprint mappings
bAutoPlayboolAuto-play on construction
bLoopPlaybackboolLoop playback

Workflow

  1. Create a UTextAnimationDataAsset, add animation entries (FAnimationEntry) to the Entries array
  2. Each entry contains a TagName and a Type (corresponding UTextAnimationBlueprint)
  3. In rich text, wrap text segments with <TagName>text content</> to apply animations
  4. Assign AnimationData to the UAnimatedRichTextBlock, 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), where id matches a RowName in the RichImageRow data table used by URichTextBlockImageDecorator

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.

images/animated-text-widgets-comparison.png — Top: UAnimatedTextBlock with typewriter effect revealing "Hello Texturge!"; Bottom: UAnimatedRichTextBlock with "Welcome to" in default style and "Texturge" in wave bounce-in animation
images/dataasset-config.png — UTextAnimationDataAsset Details panel Entries array editor showing Wave/Shake/Fade entries with TagName and TextAnimationBlueprint asset selectors