BlueprintTextLanguage 是一个 Unreal Engine 编辑器插件,用于在蓝图和结构化文本之间进行导入、导出,并通过 Remote Control API 暴露自动化编辑接口。
- 将 Blueprint、AnimBlueprint、WidgetBlueprint、LevelSequence、DataTable、Struct、Enum 等资产导出为结构化文本
- 通过 JSON 描述创建或修改蓝图函数、事件图、变量、接口和组件
- 支持资产缓存、类/函数搜索、Live Coding 编译触发等自动化工作流
- 可选识别 UnLua 绑定信息,不依赖 UnLua 插件或头文件
UE 插件(需在项目中启用):
Remote Control API— HTTP 接口核心Remote Control Web Interface— 开启 Web 访问能力
端口配置(DefaultEngine.ini):
[/Script/RemoteControl.RemoteControlSettings]
RemoteControlHttpServerPort=30010默认端口即为 30010,一般无需修改。
本插件编译: 将 BlueprintTextLanguage 放入项目 Plugins/ 目录,在 .uproject 中启用,正常编译即可。若使用 Live Coding(Editor 运行时热重载),可通过下方 API 触发编译。
所有调用均为 HTTP PUT,Body 为 JSON,目标对象固定为:
/Script/BlueprintTextLanguage.Default__BTLManager
PowerShell 调用模板:
$body = ConvertTo-Json @{
objectPath = "/Script/BlueprintTextLanguage.Default__BTLManager"
functionName = "<函数名>"
parameters = @{ <参数键值对> }
generateTransaction = $true
}
$result = Invoke-RestMethod -Method PUT `
-Uri 'http://localhost:30010/remote/object/call' `
-ContentType 'application/json' `
-Body $body将指定蓝图转换为结构化文本,返回在 OutText 字段中。同时自动缓存为 .btl 文件到 [ProjectSaved]/BlueprintTextLanguage/(镜像资产路径结构)。
参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径(UE 内部路径格式) |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"ExportToText","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar.BP_Bar"},"generateTransaction":true}'
$r = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$r.ReturnValue # true = 成功
# 内容从缓存文件读取(避免终端溢出):
# Get-Content "[ProjectSaved]/BlueprintTextLanguage/Game/Foo/BP_Bar.btl" -TotalCount 60蓝图路径格式说明:
- 内容浏览器中右键资产 → "Copy Reference",去掉
Blueprint'...'外层:- 原始:
Blueprint'/Game/Foo/BP_Bar.BP_Bar' - 使用:
/Game/Foo/BP_Bar.BP_Bar
- 原始:
蓝图路径格式(动画蓝图同理):
- 内容浏览器右键 → "Copy Reference",去掉外层类型前缀,如:
AnimBlueprint'/Game/Foo/ABP_Bar.ABP_Bar'→/Game/Foo/ABP_Bar.ABP_Bar
格式约定:
| 标记 | 含义 |
|---|---|
== Section == |
一级章节(Variables / Functions / Event Graphs 等) |
--- Name --- |
二级条目(单个函数 / 事件 / 动画图) |
[N] NodeID | Title |
节点 |
[>] pin / [>] pin -> Target.Pin |
执行输出引脚 |
[<e] pin |
执行输入引脚 |
[<] pin = val / [<] pin -> Source.Pin |
数据输入引脚 |
[~] pin -> Target.Pin |
数据输出引脚(仅有连线时输出) |
- Name | Type | Default | Category |
变量 / 属性条目 |
普通蓝图输出节段(按顺序):
== Blueprint ==
Name: <Name>
Path: <AssetPath>
Type: Blueprint
Parent: <ParentName> | native/blueprint | <ParentPath>
== Interfaces ==
- <InterfaceName>
== Variables ==
- <VarName> | <Type> | <Default> | <Category>
== Components ==
- <VarName> | <Class> | <Parent>
== CDO Overrides ==
- <PropName> | <PropClass> | <Value>
== Functions ==
--- <FuncName> ---
[N] <NodeID> | <Title>
[>] then -> <TargetNode>.<Pin>
[<] param = <value>
== Event Graphs ==
--- <EventName> ---
...
== UnLua ==
Module: <module.name>
File: <lua_path>
动画蓝图输出节段(按顺序):
== AnimBlueprint ==
Name: <Name>
Path: <AssetPath>
Type: AnimBlueprint
Skeleton: <SkeletonName> | <SkeletonPath>
Parent: <ParentName> | native/blueprint | <ParentPath>
== Variables ==
== Functions ==
== Event Graphs ==
== Anim Graphs ==
--- AnimGraph ---
[Root] OutputPose
[SM] <StateMachineName>
[State] <StateName>
[SequencePlayer] <AnimSequenceName>
[Trans] StateA -> StateB
[Conduit] <ConduitName>
[Slot] <SlotName>
读取缓存文件(推荐,避免终端溢出):
# ExportToText 自动缓存到 [ProjectSaved]/BlueprintTextLanguage/ 下
# 路径规则:/Game/Foo/BP_Bar → Saved/BlueprintTextLanguage/Game/Foo/BP_Bar.btl
Get-Content "[ProjectSaved]/BlueprintTextLanguage/Game/Foo/BP_Bar.btl" -TotalCount 60关卡序列路径格式:
- 内容浏览器右键 → "Copy Reference",去掉外层类型前缀:
LevelSequence'/Game/Foo/LS_Bar.LS_Bar'→/Game/Foo/LS_Bar.LS_Bar
关卡序列输出节段(按顺序):
== LevelSequence ==
Name: <Name>
Path: <AssetPath>
DisplayRate: <fps> (TickResolution: <num>/<den>)
Duration: <StartFrame> - <EndFrame> frames (<seconds> s)
== Marked Frames ==
- <Label> | <FrameNumber> | deterministic
== Master Tracks ==
- <TrackName> | <TrackClass>
- Section: <Start> - <End> frames
== Bindings ==
[Possessable] <ObjectName> | <ClassName>
- <TrackName> | <TrackClass>
- Section: <Start> - <End> frames
[Spawnable] <SpawnName> | <ClassName>
== Director Blueprint ==
<完整蓝图输出>
蓝图接口输出节段(按顺序):
== Interface ==
Name: <Name>
Path: <AssetPath>
== Interface Functions ==
--- <FuncName> ---
[param] Amount | float
[param] DamageType | UDamageType*
[return] ReturnValue | float
宏库输出节段(按顺序):
== MacroLibrary ==
Name: <Name>
Path: <AssetPath>
== Variables ==
== Macros ==
--- <MacroName> ---
[in] Condition | bool
[out] Result | int32
函数库输出节段(按顺序):
== FunctionLibrary ==
Name: <Name>
Path: <AssetPath>
Parent: <ParentName> | native | <ParentPath>
== Variables ==
== Functions ==
结构体(UserDefinedStruct)输出节段:
== Struct ==
Name: <Name>
Path: <AssetPath>
== Fields ==
- Speed | float | 0.0 | 移动
- Count | int32 | |
- Tags | TArray<FString> | |
数据表(DataTable)输出节段:
== DataTable ==
Name: <Name>
Path: <AssetPath>
RowStruct: <RowStructName>
Rows: <N>
== Rows ==
--- RowKey1 ---
FieldA = value
FieldB = value
枚举(UserDefinedEnum)输出节段:
== Enum ==
Name: <Name>
Path: <AssetPath>
== Values ==
- Idle | 0 | 空闲
- Moving | 1 | 移动中
- Dead | 2 |
控件蓝图输出节段(按顺序):
== WidgetBlueprint ==
Name: <Name>
Path: <AssetPath>
Parent: <ParentName> | native/blueprint | <ParentPath>
== Variables ==
== Widget Tree ==
- CanvasPanel_0 | UCanvasPanel
- Btn_Submit | UButton | variable
- Text_Submit | UTextBlock
- Img_BG | UImage | variable
== Widget Animations ==
- ShowPanel | 30 frames | 1.00s
- HidePanel | 20 frames | 0.67s
== Functions ==
== Event Graphs ==
== UnLua ==
同步触发 Live Coding 编译并等待完成,用于 AI 助手验证代码改动是否可编译。仅 Win64 Editor 下可用。
参数: 无
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
OutResult |
string | 编译结果("Success" / "NoChanges" / "Failure" 等) |
ReturnValue |
bool | true = 编译成功或无变化,false = 失败 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"TriggerLiveCoding","parameters":{},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result手动触发,遍历项目 Content/、Source/、Plugins/ 目录,将扫描结果以 JSON 格式持久化到 [项目根]/Saved/BlueprintTextLanguage/。
用途: 供后续文件查找使用,避免每次遍历整个目录树,提升 AI 分析流程效率。
参数: 无
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
ReturnValue |
bool | true = 生成成功 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"BuildAssetCache","parameters":{},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result生成文件:
| 文件 | 内容 |
|---|---|
Saved/BlueprintTextLanguage/cache_uasset.json |
所有 .uasset / .umap 路径(Content + Plugins) |
Saved/BlueprintTextLanguage/cache_source.json |
所有 .h / .cpp 路径(Source + Plugins) |
文件格式(cache_uasset.json):
{
"generated": "YYYY-MM-DD HH:MM:SS",
"count": <N>,
"paths": [
"<ProjectRoot>/Plugins/MyPlugin/Content/BP_Example.uasset",
...
]
}文件格式(cache_source.json):
{
"generated": "YYYY-MM-DD HH:MM:SS",
"headers_count": <N>,
"sources_count": <M>,
"headers": [ "<ProjectRoot>/Source/MyModule/MyActor.h", ... ],
"sources": [ "<ProjectRoot>/Source/MyModule/MyActor.cpp", ... ]
}PowerShell 查询示例(文件查找):
# 在 uasset 缓存中按名称关键字查找
$j = Get-Content "[项目根]\Saved\BlueprintTextLanguage\cache_uasset.json" | ConvertFrom-Json
$j.paths | Where-Object { $_ -match "MyAsset" }
# 在源码缓存中按类名关键字查找
$s = Get-Content "[项目根]\Saved\BlueprintTextLanguage\cache_source.json" | ConvertFrom-Json
$s.headers | Where-Object { $_ -match "MyClass" }注意: 缓存不会自动更新,每次增删文件后需重新调用
BuildAssetCache。
向指定蓝图添加一个新的成员变量,添加后自动重编译并持久化保存。
参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径,格式同 ExportToText |
VarName |
string | 变量名,与已有变量重名时返回 false |
VarType |
string | 类型字符串,支持:int / int64 / bool / float / string / name / text |
DefaultValue |
string | 默认值字符串,空字符串表示使用类型零值 |
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
ReturnValue |
bool | true = 成功 |
OutError |
string | 失败时包含错误描述 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"AddVariable","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar","VarName":"MyCount","VarType":"int","DefaultValue":"0","OutError":""},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue # true = 成功
$result.OutError # 失败时说明原因通过 JSON 描述的节点图,向指定蓝图添加一个新函数。支持节点类型:entry / sequence / print / branch / call / spawn / getvar / setvar,节点坐标由 BFS 自动布局分配。
参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径,格式同 ExportToText |
FuncName |
string | 函数名,与已有函数重名时返回 false |
GraphJson |
string | 节点图 JSON,包含 nodes 和 links 两个数组 |
JSON 格式:
{
"nodes": [
{ "id": "seq", "type": "sequence" },
{ "id": "p0", "type": "print", "message": "Hello" },
{ "id": "br", "type": "branch" },
{ "id": "myCall", "type": "call", "class": "KismetSystemLibrary", "func": "PrintString",
"pins": { "InString": "custom text" } }
],
"links": [
{ "from": "entry", "fromPin": "then", "to": "seq", "toPin": "execute" },
{ "from": "seq", "fromPin": "then_0", "to": "p0", "toPin": "execute" }
]
}节点类型说明:
| 类型 | 说明 |
|---|---|
entry |
函数入口,固定 id 为 "entry",无需在 nodes 中声明 |
sequence |
UK2Node_ExecutionSequence,then 引脚数由 links 中的输出连线数自动决定 |
print |
KismetSystemLibrary::PrintString 的快捷别名,message 字段写入 InString |
branch |
UK2Node_IfThenElse(条件分支),引脚:execute / Condition / then / else |
call |
任意静态函数调用,须指定 class 和 func;pins 字典设置引脚固定值 |
spawn |
UK2Node_SpawnActorFromClass,class 字段指定目标 Actor 类路径;SpawnTransform 为必填引脚 |
getvar |
UK2Node_VariableGet,var 字段指定变量名(须预先存在于蓝图) |
setvar |
UK2Node_VariableSet,var 字段指定变量名(须预先存在于蓝图) |
接口实现图复用:若
FuncName与已有接口实现占位图同名,AddFunctionFromJson会自动复用该图(清空非入口节点)并填充新逻辑,无需手动删除占位图。
示例(Entry→Sequence→5×PrintString):
$graphJson = '{"nodes":[{"id":"seq","type":"sequence"},{"id":"p0","type":"print","message":"Line 0"},{"id":"p1","type":"print","message":"Line 1"},{"id":"p2","type":"print","message":"Line 2"},{"id":"p3","type":"print","message":"Line 3"},{"id":"p4","type":"print","message":"Line 4"}],"links":[{"from":"entry","fromPin":"then","to":"seq","toPin":"execute"},{"from":"seq","fromPin":"then_0","to":"p0","toPin":"execute"},{"from":"seq","fromPin":"then_1","to":"p1","toPin":"execute"},{"from":"seq","fromPin":"then_2","to":"p2","toPin":"execute"},{"from":"seq","fromPin":"then_3","to":"p3","toPin":"execute"},{"from":"seq","fromPin":"then_4","to":"p4","toPin":"execute"}]}'
$esc = $graphJson -replace '\\', '\\\\' -replace '"', '\"'
$body = "{`"objectPath`":`"/Script/BlueprintTextLanguage.Default__BTLManager`",`"functionName`":`"AddFunctionFromJson`",`"parameters`":{`"BlueprintPath`":`"/Game/Foo/BP_Bar`",`"FuncName`":`"TestFromJson`",`"GraphJson`":`"$esc`"},`"generateTransaction`":false}"
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径,格式同 ExportToText |
FuncName |
string | 要删除的函数名 |
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
ReturnValue |
bool | true = 成功 |
OutError |
string | 失败时包含错误描述 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"RemoveFunction","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar","FuncName":"OldFunc","OutError":""},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径,格式同 ExportToText |
OldFuncName |
string | 原函数名 |
NewFuncName |
string | 新函数名,与已有函数重名时返回 false |
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
ReturnValue |
bool | true = 成功 |
OutError |
string | 失败时包含错误描述 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"RenameFunction","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar","OldFuncName":"OldName","NewFuncName":"NewName","OutError":""},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径,格式同 ExportToText |
VarName |
string | 要删除的变量名 |
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
ReturnValue |
bool | true = 成功 |
OutError |
string | 失败时包含错误描述 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"RemoveVariable","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar","VarName":"OldVar","OutError":""},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 蓝图资产路径,格式同 ExportToText |
VarName |
string | 目标变量名 |
NewDefaultValue |
string | 新的默认值字符串 |
返回:
| 字段 | 类型 | 说明 |
|---|---|---|
ReturnValue |
bool | true = 成功 |
OutError |
string | 失败时包含错误描述 |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"SetVariableDefault","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar","VarName":"MyCount","NewDefaultValue":"42","OutError":""},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError注意:此接口仅更新蓝图元数据中的默认值字段,不触发完整重编译。CDO 默认值将在蓝图下次编译时生效。
向指定蓝图添加接口继承,支持原生 C++ 接口(/Script/... 路径)和蓝图接口(/Game/... 路径),添加后自动重编译并持久化保存,同时生成空实现占位图。
参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 目标蓝图路径,格式同 ExportToText |
InterfacePath |
string | 接口类路径(见格式说明) |
接口路径格式:
| 接口类型 | 路径格式 | 示例 |
|---|---|---|
| 原生 C++ 接口 | /Script/<模块名>.<类名> |
/Script/UnLua.UnLuaInterface |
| 蓝图接口 | /Game/...(同 ExportToText 路径) |
/Game/Interfaces/BPI_MyInterface |
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"AddInterface","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar","InterfacePath":"/Script/UnLua.UnLuaInterface","OutError":""},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError删除蓝图中所有用户创建的函数图、成员变量和接口继承,重新编译并持久化保存。常用于在重新构建蓝图内容前的清理操作。
参数:
| 参数 | 类型 | 说明 |
|---|---|---|
BlueprintPath |
string | 目标蓝图路径,格式同 ExportToText |
注意:系统保留图(
UserConstructionScript、EventGraph等)不会被删除。
示例:
$body = '{"objectPath":"/Script/BlueprintTextLanguage.Default__BTLManager","functionName":"ClearBlueprint","parameters":{"BlueprintPath":"/Game/Foo/BP_Bar"},"generateTransaction":false}'
$result = Invoke-RestMethod -Method PUT -Uri 'http://localhost:30010/remote/object/call' -ContentType 'application/json' -Body $body
$result.ReturnValue
$result.OutError插件对 UnLua 的支持是完全可选的,不依赖 UnLua 插件或头文件:
- 若蓝图包含
GetModuleName函数图,插件会从该函数的返回值节点读取模块名字符串 - 模块名按
.分隔转换为目录路径,在Content/Script/下查找对应.lua文件 - 输出中只记录模块名和文件路径,不嵌入源码(源码请另行阅读 Lua 文件)
- 不使用 UnLua 的蓝图:输出中不会出现任何 Lua 相关节段
每个节点输出格式:
[Node] <节点标题> (ID: <NodeID>) [Class: <K2Node类名>]
[执行入口] <引脚名> -> [节点ID: <ID>, 引脚: <Pin>]
[执行出口] <引脚名> -> [节点ID: <ID>, 引脚: <Pin>] 或 -> (None)
[数据输入] <引脚名>: 关联至 -> [节点ID: <ID>, 引脚: <Pin>]
[数据输入] <引脚名>: 固定值(<字面量>)
[数据输出] <引脚名>: 关联至 -> [节点ID: <ID>, 引脚: <Pin>]
纯数据节点(无执行引脚)会在其下游执行节点之前输出,保持依赖前序。
重构后采用可扩展的 Exporter 模式,每种蓝图类型对应独立的 Exporter 类:
| 文件 | 职责 |
|---|---|
Public/Exporters/BTLExporterBase.h / Private/Exporters/BTLExporterBase.cpp |
基类:数据结构(FBTLPin / FBTLNode)、图遍历工具、K2函数/事件/UnLua 等公共节段 |
Public/Exporters/BTLBlueprintExporter.h / Private/Exporters/BTLBlueprintExporter.cpp |
普通蓝图 Exporter:头信息、接口、变量、组件、CDO |
Public/Exporters/BTLAnimBlueprintExporter.h / Private/Exporters/BTLAnimBlueprintExporter.cpp |
动画蓝图 Exporter:动画头信息、动画图表、状态机展开 |
Public/Exporters/BTLInterfaceBlueprintExporter.h / Private/Exporters/BTLInterfaceBlueprintExporter.cpp |
蓝图接口 Exporter:接口函数签名(参数 + 返回值) |
Public/Exporters/BTLMacroLibraryExporter.h / Private/Exporters/BTLMacroLibraryExporter.cpp |
宏库 Exporter:宏图表列表 + 宏的输入/输出引脚签名 |
Public/Exporters/BTLFunctionLibraryExporter.h / Private/Exporters/BTLFunctionLibraryExporter.cpp |
函数库 Exporter:头信息、变量、函数(无 SCS/CDO) |
Public/Exporters/BTLLevelSequenceExporter.h / Private/Exporters/BTLLevelSequenceExporter.cpp |
关卡序列 Exporter:时间标记、主轨道、绑定、导演蓝图 |
Public/Exporters/BTLWidgetBlueprintExporter.h / Private/Exporters/BTLWidgetBlueprintExporter.cpp |
控件蓝图 Exporter:控件树(递归层级)、控件动画(帧范围)、变量、函数、事件图表 |
Public/Exporters/BTLStructExporter.h / Private/Exporters/BTLStructExporter.cpp |
结构体 Exporter:字段列表(类型/名称/默认值),支持 TArray/TSet/TMap 嵌套 |
Public/Exporters/BTLDataTableExporter.h / Private/Exporters/BTLDataTableExporter.cpp |
数据表 Exporter:行结构体类型 + 所有行的字段键值对 |
Public/Exporters/BTLEnumExporter.h / Private/Exporters/BTLEnumExporter.cpp |
枚举 Exporter:枚举值列表(内部名、数值、显示名) |
Public/BTLCommandlet.h / Private/BTLCommandlet.cpp |
薄路由层:根据蓝图类型分发到对应 Exporter |
Public/BTLManager.h / Private/BTLManager.cpp |
UObject 入口,暴露给 Remote Control 的 API(含 BuildAssetCache) |
Public/BTLFileUtils.h |
插件存储目录工具(纯头文件):GetStorageDir() / EnsureStorageDir() / StoragePath() |
BlueprintTextLanguage.Build.cs |
模块依赖(AnimGraph、BlueprintGraph、UnrealEd、Json 等) |
新增支持模板: 若要支持新蓝图类型,创建继承自 FBTLExporterBase 的新类,在 BTLCommandlet.cpp 的 Export() 中增加路由判断即可。
| 类型 | 状态 | 说明 |
|---|---|---|
| 普通蓝图(UBlueprint) | ✅ 已支持 | 组件、变量、函数、事件图表、UnLua 绑定 |
| 动画蓝图(UAnimBlueprint) | ✅ 已支持 | 目标骨架、动画图表、状态机展开 |
| 关卡序列(ULevelSequence) | ✅ 已支持 | 时间标记、主轨道、绑定(Possessable/Spawnable)、导演蓝图 |
| 蓝图接口(UBlueprint / BPTYPE_Interface) | ✅ 已支持 | 接口函数签名(参数 + 返回值类型) |
| 蓝图宏库(UBlueprint / BPTYPE_MacroLibrary) | ✅ 已支持 | 宏列表 + 每个宏的输入/输出引脚签名 |
| 蓝图函数库(UBlueprint / BPTYPE_FunctionLibrary) | ✅ 已支持 | 变量 + 静态函数图(无 SCS / 无 CDO) |
| 控件蓝图(UWidgetBlueprint) | ✅ 已支持 | 控件树(递归层级)、控件动画(帧范围)、变量、函数、事件图表、UnLua |
| 结构体(UUserDefinedStruct) | ✅ 已支持 | 字段列表(类型/名称/默认值)、支持 TArray/TSet/TMap 嵌套 |
| 数据表(UDataTable) | ✅ 已支持 | 行结构体类型 + 所有行键值对(ExportText_InContainer) |
| 枚举(UUserDefinedEnum / UEnum) | ✅ 已支持 | 枚举值列表(内部名、数值、显示名) |
| AI 行为树 / 黑板 | ⬜ TODO | 非蓝图资产,需单独支持 |
- ✅
TMap变量的值类型正确输出(原来显示?,现已从PinValueType读取真实类型) - ⬜ 状态机条件节点(转换规则)的详细展开(目前只显示 StateA → StateB)
- ⬜ 混合树(Blend Tree)节点的权重/参数展开
- ⬜ 普通蓝图 CDO 覆盖的属性值格式化(结构体/对象类型)
本项目采用 MIT License 授权。详见 LICENSE。