蓝图节点参考
本文档按类组织 Texturge 暴露的全部蓝图函数(速查表)。详细的函数签名、参数与使用模式见《蓝图 API》章节;UGlyphAnimationLayer / UGlyphAnimationFactory 的完整节点族见《蓝图 API · 节点参考》。
NOTE
UTextAnimator不暴露任何蓝图函数(全部为普通 C++ 方法,由UAnimatedRichTextBlock内部驱动)。UK2Node_PrintWithAnimation节点已在重构中移除,当前版本不存在。
UAnimatedTextBlock
播放控制(Category Animation)
| 节点 | DisplayName | 说明 |
|---|---|---|
Play | 播放 | 开始逐字揭示动画 |
Pause | 暂停 | 暂停播放 |
Resume | 恢复 | 恢复播放 |
Stop | 停止 | 停止并重置 |
SkipToEnd | 跳转到结尾 | 直接显示全部文本 |
IsAnimating | 是否正在播放 | BlueprintPure 查询 |
蓝图变量设置(6 重载)
| 节点 | DisplayName | Value 类型 |
|---|---|---|
SetBlueprintVariable | 设置蓝图变量 | float |
SetBlueprintVariable_Int | 设置蓝图变量 (Int) | int32 |
SetBlueprintVariable_Bool | 设置蓝图变量 (Bool) | bool |
SetBlueprintVectorVariable | 设置蓝图变量 (Vector) | FVector |
SetBlueprintColorVariable | 设置蓝图变量 (Color) | FLinearColor |
SetBlueprintVector2DVariable | 设置蓝图变量 (Vector2D) | FVector2D |
蓝图事件(BlueprintAssignable)
| 事件 | 签名 |
|---|---|
OnCharacterRevealedBP | int32 RevealedCount |
OnAnimationCompleteBP | — |
UAnimatedRichTextBlock
播放控制(Category Animation)
Play / Pause / Resume / Stop / SkipToEnd / IsAnimating — 与 UAnimatedTextBlock 同构。
蓝图事件(BlueprintAssignable)
| 事件 | 签名 |
|---|---|
OnCharacterRevealedBP | int32 CharIndex, FString Character |
OnAnimationCompleteBP | — |
UTextAnimationStageController
播放控制(Category Texturge|阶段控制器)
| 节点 | DisplayName | 说明 |
|---|---|---|
Play / Pause / Resume / Stop | 播放/暂停/恢复/停止 | 播放生命周期 |
RevealAll | 揭示所有 | 立即揭示全部字形 |
SetPlayDirection(EStagePlayDirection) | 设置播放方向 | Forward / Reverse / PingPong |
SetLoop(bool) | 设置循环 | 循环播放 |
TickAnimation(float) | Tick 动画 | 每帧推进时钟 |
EvaluateAllGlyphs(TArray<FGlyphAnimationState>&) | 评估所有字形 | 批量求值 |
查询(BlueprintPure)
| 节点 | DisplayName | 返回 |
|---|---|---|
IsPlaying | 是否正在播放 | bool |
IsComplete | 是否完成 | bool |
GetCurrentStage | 获取当前阶段 | EAnimationStage |
GetStageTime | 获取阶段时间 | float |
GetRevealedGlyphCount | 获取已揭示字数 | int32 |
GetTotalGlyphCount | 获取总字数 | int32 |
NOTE
旧文档中的
GoToStage/GetStageState/SetTransitionDuration/SetCrossfadeEnabled节点不存在于当前版本——阶段切换由TickAnimation自动推进,过渡时长由蓝图资产的StageTransitionConfig属性配置。
UTextAnimInstance
| 节点 | DisplayName | 说明 |
|---|---|---|
SetBlueprintVariable | 设置蓝图变量 | float 重载 |
SetBlueprintVectorVariable | 设置蓝图变量 (Vector) | FVector 重载 |
SetBlueprintColorVariable | 设置蓝图变量 (Color) | FLinearColor 重载 |
SetBlueprintVector2DVariable | 设置蓝图变量 (Vector2D) | FVector2D 重载 |
BuildScheduleInfos | 构建调度信息 | 静态,文本 → TArray<FGlyphScheduleInfo> |
GetAnimationByName | 按名称获取动画 | 查找 UGlyphAnimation |
GetCharacterCount | 获取字符数 | BlueprintPure |
UGlyphAnimationLayer / UGlyphAnimationFactory
完整节点族(层 73 个、工厂 69 个蓝图函数):
| 分组 | 节点(节选) | 说明 |
|---|---|---|
| 创建 | 创建字形动画层 / 创建字形动画层(文本) / 创建工厂 / 创建工厂(文本) | 静态工厂(工厂创建需传入基础层 + 调度) |
| 层管理 | 添加层 / 设置层(工厂) | 后添加的层级更高 |
| 调度 | 设置字形延迟 / 跳过字形 / 设置起始延迟值 / 设置跳过动画 / 设置动画剪切 | Index = -1 作用于全部 |
| 分类查询 | 是空白字形 / 是标点符号 / 是中日韩文字 / 是装饰器字形 | 调度分类判定 |
| 字形微调 | 10 属性 ×(乘算/除算/加算/减算/清除步骤) + 清除字形全部微调 | 有序操作步骤(51 个) |
| 播放 | 设置播放模式(层) | PlayDirection + 倍速 + 循环次数 |
| 烘焙 | 烘焙(工厂) | 返回 FBakedStage |
UEventSoundComponent
| 节点 | DisplayName | 说明 |
|---|---|---|
SetSoundForCharacter(int32, TSoftObjectPtr<USoundBase>) | 设置字形音效 | 字符 → 音效映射 |
GetSoundForCharacter(int32) | 获取角色音效 | 查询映射 |
RemoveSoundForCharacter(int32) | 移除字形音效 | 删除映射 |
ClearAllSounds() | 清空所有音效 | 清空全部映射 |
SetPunctuationDelayForCharacter(int32, float) | 设置标点延迟 | 标点停顿(秒) |
GetPunctuationDelayForCharacter(int32) | 获取标点延迟 | BlueprintPure |
ResetPunctuationDelaysToDefault() | 重置标点延迟 | 恢复默认 |
ClearPunctuationDelays() | 清空标点延迟 | 清空 |
BindToAnimator() / UnbindFromAnimator() | 绑定/取消绑定动画器 | 自动查找同 Actor 的 UTextAnimator |
蓝图变量系统
EAnimParamType
| 枚举值 | C++ 类型 |
|---|---|
Float | float |
Int | int32 |
Bool | bool |
Vector | FVector |
Color | FLinearColor |
Vector2D | FVector2D |
TAnimParamTraits 映射
TAnimParamTraits<T, Owner> 将 C++ 类型映射到覆盖 Map 成员(UAnimParameterOverrides 与 FAnimationEntry 各一套特化),支撑 SetBlueprintVariable 类型安全多重载与 ApplyAnimParamOverridesToInstance 统一注入。
UAnimParameterOverrides
实例参数覆盖存储对象:
UCLASS(meta = (DisplayName = "动画参数覆盖"))
class TEXTURGE_API UAnimParameterOverrides : public UObject
{
TMap<FName, float> FloatOverrides;
TMap<FName, int32> IntOverrides;
TMap<FName, bool> BoolOverrides;
TMap<FName, FVector> VectorOverrides;
TMap<FName, FLinearColor> ColorOverrides;
TMap<FName, FVector2D> Vector2DOverrides;
};
NOTE
UAnimParameterOverrides是UObject(UCLASS) 而非 USTRUCT——它以 Instanced 属性挂在UAnimatedTextBlock::ParameterOverrides上,每个控件实例独立持有。
参数覆盖优先级
- 控件实例覆盖 —
UAnimatedTextBlock::ParameterOverrides(细节面板编辑) - 条目覆盖 —
FAnimationEntry的 6 组覆盖 Map(数据资产中配置) - 蓝图默认值 — 动画蓝图类默认值(Class Defaults)中的变量默认值
烘焙时优先序 1 > 2 > 3,覆盖写入烘焙临时实例,蓝图 CDO 永不修改。