蓝图节点参考

Texturge 提供丰富的蓝图可调用节点,覆盖播放控制、参数覆写、图层编排与状态查询。完整签名见《蓝图 API · 节点参考》,本文聚焦使用模式。

UAnimatedTextBlock 控制节点

适用场景:在蓝图中控制文字动画的播放生命周期。

节点说明
播放启动动画播放(内部驱动 UTextAnimationStageController::Play
暂停暂停当前播放,状态保持
恢复从暂停位置恢复
停止停止并重置所有字形
跳转到结尾立即显示全部字形
是否正在播放BlueprintPure 查询
images/blueprint-play-pause.png — 蓝图图表示例:事件 BeginPlay → 播放 节点;输入事件分支分别连接 暂停/恢复/停止/跳转到结尾 节点 — Blueprint graph example: Event BeginPlay → Play node; input event branches wired to Pause/Resume/Stop/SkipToEnd nodes

SetBlueprintVariable 参数覆写

适用场景:运行时动态覆盖动画蓝图参数,无需重新编译。

UAnimatedTextBlock 提供 6 个类型化重载(Float / Int / Bool / Vector / Color / Vector2D),写入控件实例的 UAnimParameterOverrides 覆盖 Map,标记 Dirty 后经 3 帧冷却自动重烘焙:

[事件 BeginPlay]
    → [设置蓝图变量] ("Speed", 2.0)      ← float
    → [设置蓝图变量 (Color)] ("Tint", 红)  ← FLinearColor
    → [播放]

NOTE

VariableName 须与动画蓝图类默认值(Class Defaults)中声明的变量名一致(FName 比较不区分大小写)。控件级 6 重载覆盖全部类型;UTextAnimInstance 自身提供 4 重载(float / Vector / Color / Vector2D)。

images/blueprint-set-variable.png — 蓝图图表示例:AnimatedTextBlock 引用连接 设置蓝图变量("Speed", 2.0)与 设置蓝图变量 (Color) 节点,再连接 播放 — Blueprint graph example: AnimatedTextBlock reference wired to SetBlueprintVariable ("Speed", 2.0) and SetBlueprintVariable (Color) nodes, then to Play

阶段控制器节点

适用场景:控制阶段播放方向、循环与揭示。

节点说明
播放 / 暂停 / 恢复 / 停止 / 揭示所有播放生命周期(手动路径使用)
设置播放方向EStagePlayDirectionForward / Reverse / PingPong
设置循环(bool)循环播放
Tick 动画(float)手动驱动时钟(控件自动调用,一般无需手动)
评估所有字形批量输出 TArray<FGlyphAnimationState>

NOTE

Initialize / PublishBakedAnimation 为 C++ 注入接口(非蓝图节点)。控件路径自动完成编译与初始化,仅在手动 C++ 驱动时需要。

字形动画层与工厂编排

适用场景:在 BuildDefaultAnimation 事件图中链式编排多层动画。

[Event BuildDefaultAnimation (GlyphCount, Text)]
    → [构建调度信息 (Text)] → Schedule
    → [创建字形动画层 (GlyphAnimations[0], Override, Schedule, Forward, 1.0, 1)] → Layer
        → [设置起始延迟值 (Layer, -1, 0.0)]
        → [设置字形延迟 (Layer, -1, 0.05)]
        → [跳过字形 (Layer, -1)]
        → [乘算字形缩放 (Layer, 0, (1.2, 1.2))]
    → [创建工厂 (Layer, Schedule)] → Factory
        → [添加层 (Factory, Layer2)]
        → [乘算字形平移 (Factory, -1, (2.0, 1.0))]
        → [烘焙 (Factory)] → Return Baked Stage

所有 Layer / Factory 节点返回自身,支持无限链式连线。

UAnimParameterOverrides

适用场景:在 UMG 细节面板按实例覆盖蓝图参数默认值。

UAnimParameterOverrides 是挂在 UAnimatedTextBlock::ParameterOverrides 上的 Instanced UObject,提供 6 组覆盖 Map:

覆盖组值类型
FloatOverrides变量名float
IntOverrides变量名int32
BoolOverrides变量名bool
VectorOverrides变量名FVector
ColorOverrides变量名FLinearColor
Vector2DOverrides变量名FVector2D

优先级:控件实例覆盖 > 数据资产条目覆盖 > 蓝图默认值。每个变量行带 Reset 按钮(CDO 永不修改)。

UAnimatedRichTextBlock 控制节点

适用场景:富文本多标签段落播放控制。

UAnimatedTextBlock 同构的 6 个节点(播放 / 暂停 / 恢复 / 停止 / 跳转到结尾 / 是否正在播放),作用于全部标签段落;bSequentialPlayback 属性切换顺序/同时播放。

查询节点速查

节点目标类返回
是否正在播放两个控件bool
是否完成 / 获取当前阶段 / 获取阶段时间 / 获取已揭示字数 / 获取总字数UTextAnimationStageController见函数名
获取持续时间 / 获取轨道类型 / 是否有轨道类型UGlyphAnimationfloat / 数组 / bool
获取字符数 / 按名称获取动画UTextAnimInstanceint32 / UGlyphAnimation*
设置字形音效 / 设置标点延迟UEventSoundComponent
images/blueprint-all-nodes.png — 完整蓝图编排示例:BeginPlay 初始化(设置蓝图变量 + 播放)+ BuildDefaultAnimation 覆盖事件图(创建层/工厂链式编排 + 烘焙返回)组合展示 — Complete blueprint example: BeginPlay initialization (SetBlueprintVariable + Play) combined with the BuildDefaultAnimation override graph (Layer/Factory chain orchestration + Bake return)