MassBattle Frameworkv1.20.0

工具与命令层 Tooling and the Command Layer

EDITOR TOOLING

panels, the bake pipeline, and the same actions as commands

三种用法,同一套动作 Three Doors, One Set of Actions

这套工具的内核只有一份:每个动作都先是一个无界面的操作,面板上的按钮、编辑器控制台里的命令、以及 AI 发来的调用,三者走的是同一个入口。所以你学会一个面板,就同时学会了它的脚本化用法;反过来,AI 能做的事你在面板里也都能点到。

There is exactly one core: every action is first a headless operation, and the panel button, the editor console command and an AI call all enter through the same door. Learn one panel and you have also learned its scriptable form — and anything an AI can do, you can click.

门Door你在哪Where怎么触发How你得到什么What You Get
面板Panel 编辑器里的工具窗口The tool windows in the editor 点按钮;需要参数时先填面板上的行Click a button; fill the rows first when it needs input 即时结果、缩略图、进度条与取消Immediate result, thumbnails, a progress bar with cancel
控制台命令Console command 编辑器控制台(~)The editor console (~) MassBattle.Mcp.List 看清单,MassBattle.Mcp.Invoke <Id> 执行MassBattle.Mcp.List to see the inventory, MassBattle.Mcp.Invoke <Id> to run one 一条结构化结果:成功与否、稳定错误码、消息、产物清单、载荷One structured result: ok flag, stable error code, message, output assets, payload
AI / 自动化AI / automation 同一个控制台入口,由代理或脚本发The same console entry, driven by an agent or a script 先只读探测,再按需执行;支持试运行与确认策略Probe read-only first, then execute; dry-run and confirmation policies apply 同样的结构化结果——读它就够,不必去解析日志The same structured result — read it instead of parsing logs

命令失败也返回结果,不抛异常:ok=false 加一个稳定的 ASCII Code。所以脚本判"成功"看 ok,判"没变化"看 Code——幂等重跑返回 NoChange 算成功,不是失败。

A failing command still returns a result instead of throwing: ok=false plus a stable ASCII Code. So scripts test ok for success and the Code for "nothing changed" — an idempotent re-run reporting NoChange is a success, not a failure.

面板地图:哪件事归谁 Panel Map: What Owns What

面板按任务分三组:准备资产(把网格、图集、部件变成可烘的源)、烘焙单位(生成运行时资产)、维护(已经烘完之后的批量与修复)。每一组的面板对应的命令族写在最右列,点过去就是脚本化用法。

The panels fall into three groups: preparing assets (turning meshes, atlases and parts into something bakeable), baking a unit (producing the runtime assets), and maintenance (bulk work and repair after the bake). The right column names the command family behind each panel, which is where its scriptable form lives.

任务Task面板Panel它负责什么What It Owns命令族Commands
准备 · 网格与动画Prepare · mesh and animationMeshPrep网格源、动画集、移动曲线、跳跃相位、预览、写回 ATTMesh source, animation sets, locomotion curve, jump phases, preview, write-back to the ATTMeshPrep.* · MassBattle.Loco.*
准备 · 图集 spritePrepare · atlas spriteSpritePrep逐帧轨迹、notify 行、解析成 sprite 源Per-frame tracks, notify rows, resolving into a sprite sourceSpritePrep.*
准备 · 多部件Prepare · multi-partAssembly部件、版本、组合、烘焙组、命名与校验Parts, versions, combinations, bake groups, naming and validationAssembly.*
烘焙单位Bake the unitCreator标准烘焙与复合烘焙、写入单位配置资产Standard and composite bakes, writing the unit config assetCreator.*
维护 · 槽位与图集Maintain · slots and atlasSlotMerge把多个材质槽合成一张图集与一份逐网格材质副本Merging material slots into one atlas plus a per-mesh material copySlotMerge.*
维护 · 网格合并Maintain · mesh mergeSkelMerge多份骨骼网格合成一份,按描述体逐 LOD 追加Merging several skeletal meshes into one, appending per LOD from their descriptionsSkelMerge.*
维护 · 骨骼插槽Maintain · bone socketsSkeleton插槽增删,以及它们烘成实体附着落点的方式Adding and removing sockets, and how they bake into attachment anchors for entitiesSkeleton.*
维护 · 旧资产与探针Maintain · legacy assets and probesContent · ATT旧版资产升级;烘焙产物的运行期探针Upgrading legacy assets; a runtime probe of a baked assetContent.* · ATT.*
窗口本身The windows themselvesPanels列出、打开、关闭、对某个面板取快照List, open, close, and snapshot a panelPanels.*

整条流水线:先预处理,再烘焙 The Whole Pipeline: Normalise First, Bake Second

下面那些工具不是"烘焙时顺手用一下"的:它们是预处理,跑在烘焙之前。原因很实际——每改一次模型结构,之前烘出来的东西就作废一次。把资产规范好再进烘焙,整条烘焙只需要跑一遍。

The tools below are not "convenient extras while baking": they are preprocessing, and they run before the bake. The reason is practical — every change to the mesh structure invalidates whatever was baked before it. Normalise the assets first and the bake only has to run once.

第一步:预处理(资产层面) Step One: Preprocess, at the Asset Level

顺序本身有讲究:先改名,再动结构——名字统一之后,后面每一步按名字或按目录选范围才是可预期、可复现的。从旧版本带上来的资产,最前面还要先跑一次升级。

The order matters: rename before reshaping — once names are consistent, every later step can select its scope by name or by folder and still be predictable and repeatable. Assets carried over from an older version get an upgrade pass before anything else.

#做什么What工具Tool为什么在这一步Why here
1升级旧版资产Upgrade legacy assetsContent.UpgradeLegacyAssets旧结构先梳平,后面每一步才看到同一套资产Flatten the old shapes first so every later step sees one kind of asset
2统一命名Normalise namesBatchRename.Scan · .Apply之后按名字/目录圈范围才可靠So scoping by name or folder is reliable afterwards
3LOD 标准化Standardise LODsLOD.Scan · .Apply一批网格先对齐档位,合并时不会各带一套Align the ladder across the batch before merging, so merges do not carry mixed band counts
4合并网格Merge meshesSkelMerge.Scan · .Apply先减网格数量;槽数此时不变Cut the mesh count first; the slot count does not move yet
5材质槽合成图集Fold slots into an atlasSlotMerge.Scan · .BakeAtlas合并后的网格只剩一个槽,绘制次数才真正降下来The merged mesh drops to one slot, which is where the draw count actually falls
6统一母材质Unify the parent materialMaterialMerge.Analyze · .Apply多份网格指回同一个母材质,打包时着色器组合塌缩Several meshes point at one parent, collapsing the shader permutations at cook time

第二步:烘焙 Step Two: Bake

规范好的源才进烘焙。顺序是:Mesh Prep →(可换装时)Assembly → Mesh Prep → Generate。两次 Mesh Prep 不是重复:第一次是给网格(或每个部件)准备动画,中间那次 Assembly 决定部件与版本的组合,第二次是针对装配结果再确认一遍动画与烘焙设置。

Only the normalised source goes into the bake. The order is Mesh Prep, then Assembly when the unit varies outfit, then Mesh Prep again, then Generate. The two Mesh Prep passes are not repetition: the first prepares animation on the mesh (or on each part), Assembly in the middle decides how parts and versions combine, and the second confirms animation and bake settings against the assembled result.

判断依据一句话:凡是会改变"这个单位由几份网格、几个槽组成"的动作,都归预处理;凡是只改动画、参数、组合关系的,才是烘焙期的事。

One test decides it: anything that changes how many meshes and slots the unit is made of belongs to preprocessing; only animation, parameters and combination choices belong to the bake.

先选产线 Pick the Pipeline First

三条产线对应三种单位形态,选错了后面每一步都会别扭。判断只看你的源资产长什么样。

Three pipelines for three unit shapes; pick the wrong one and every later step fights you. The source asset decides it.

你的源Your Source走哪条Which Pipeline去哪读Read
一份骨骼网格,单形态、不换装One skeletal mesh, single shape, no outfit variation标准烘焙:Mesh Prep → GenerateStandard bake: Mesh Prep → Generate网格与动画Mesh and animation · Authoring & Baking
一张图集(横排帧)One atlas of side-by-side framessprite 产线:Sprite Prep → 烘焙Sprite pipeline: Sprite Prep → bake图集 spriteAtlas sprites
多部件、可换装Several parts with outfit variation装配产线:Unit Assembly → 复合烘焙Assembly pipeline: Unit Assembly → composite bake多部件装配Multi-part assembly

第一次用:先只读,再动手 First Run: Read Before You Write

工具链里读与写是分开的两类命令,这个划分不是洁癖——批处理一旦写错,产物是几百份资产。所以第一次接触一套新资产时,先跑只读的那些,看清楚现状再动。

The toolchain separates reads from writes, and not out of tidiness — one wrong bulk write leaves you with hundreds of broken assets. On any unfamiliar asset, run the read-only actions first and look at what is really there.

1. 看清楚有什么 See what exists

MassBattle.Mcp.List 列出全部命令;各族的 Scan / GetState / List / Evaluate 只读,跑多少次都不改资产。MassBattle.Mcp.List enumerates every command; each family's Scan / GetState / List / Evaluate is read-only and safe to repeat.

2. 把面板叫到面前 Bring the panel up

Panels.List 告诉你有哪些工具窗口,Panels.Open 打开指定那个——人和 AI 用的是同一份清单,不用猜菜单在哪。Panels.List names the tool windows and Panels.Open raises one — the same inventory serves a human and an agent, so nothing depends on hunting through menus.

3. 写操作先试运行 Dry-run the writes

支持试运行的动作会先报"会改什么"而不落盘。批量类动作一律先试运行一遍,确认清单再执行。Actions that support a dry run report what they would change without writing. Always dry-run a bulk action and read the list before executing.

Mesh Prep:它编辑什么、从哪里打开 Mesh Prep: What It Edits and Where It Opens

菜单 Window → Tools → Mesh Prep 打开这个面板,也可以从 Agent Creator 面板的工具行点 Mesh Prep(Standard 模式)——后者会把它作为 Creator 页签旁边的兄弟页签打开。面板标题是 Mesh Prep,右上角一个 Close。

Open it from Window → Tools → Mesh Prep, or click Mesh Prep in the Agent Creator panel's tool row (Standard mode) — that route opens it as a sibling tab beside the Creator tab. The panel is titled Mesh Prep and carries a Close button at the top right.

它编辑的是一份 ATT 数据资产:模型源、按名字分组的动画集合、每套集合自己的移动与跳跃选项、骨骼蒙版、烘焙参数,全部写在这份资产上。这里不烘焙——烘焙只有一处,就是 Agent Creator 的 Generate。两种烘焙模式与产物清单见 Authoring & Baking,本节只讲怎么把这份资产填到可以烘。

What it edits is one ATT data asset: the model source, the named animation sets, each set's own locomotion and jump options, the bone masks and the bake parameters all live on it. Nothing here bakes — the bake has exactly one home, Generate on the Agent Creator. For the two bake modes and the list of what comes out, see Authoring & Baking; this section is only about getting one asset ready to bake.

面板自上而下是:标题行;动作行 New / Load / Save / Apply / Clear;填充行 Fill Path / Fill Anim / Fill BS;然后是一个详情视图,类别按固定顺序排列——Prep Asset、Mesh Source、Texture Params、Animation、Bone Masks;最底部是只读的 Log。Animation 里每个集合是一组,组内依次是 Locomotion、Jump Cycle、Montage 与 AimOffset。参数全在详情视图里,面板不会把自动填好的内容再抄一遍。

Top to bottom: the title row; the action row New / Load / Save / Apply / Clear; the fill row Fill Path / Fill Anim / Fill BS; then one details view whose categories are fixed in this order — Prep Asset, Mesh Source, Texture Params, Animation, Bone Masks; and the read-only Log at the bottom. Inside Animation every set is one group holding Locomotion, Jump Cycle, Montage and AimOffset in that order. Every parameter lives in the details view; the panel never restates what was auto-filled.

打开面板时如果还没有任何集合,列表里会出现一个空的集合占位(名字 Default、选择器 *),它不是作者化的工作,可以直接删掉。在集合列表出现之前保存的视图把片段存在一个已退役的扁平字段里;载入时这些片段会被一次性折进第一个集合,不会被丢掉。

Opening the panel with no sets at all shows one empty set placeholder (named Default with selector *). It is not authored work and can be deleted. A view saved before the set list existed keeps its clips in a retired flat field; on load those clips are folded into the first set once, never dropped.

绑定一份已经存在的 ATT Binding an ATT You Already Have

Prep Asset 类别的第一行是 ATT 选择卡片:点进去选一份已有的 ATT,面板会把它载入进来,替换当前显示的内容。链接与载入的内容属于同一步撤销,所以一次 Ctrl+Z 会连资产带内容一起退回。第二行 Search Path 是片段搜索目录,带目录选择器,不用手敲 /Game 路径。

The first row of the Prep Asset category is the ATT asset card: pick an existing ATT and the panel loads its contents, replacing what is shown. Because the link and the loaded data are one undo step, a Ctrl+Z takes both back together. The second row, Search Path, is the clip search folder and comes with a folder picker — no typing /Game paths by hand.

还没有 ATT 时能做什么 What You Can Do Before an ATT Exists

直接按 Save 或 Apply(未绑定资产时两者都会先弹同一个创建菜单),或者先点 New。菜单标题是 New ATT Data Asset,要两样东西:资产基名与输出路径,落盘后资产名是 ATT_<基名>。New 遇到重名只改绑,绝不覆盖;Save 走创建路径时重名会自动加 _1/_2 后缀。

Press Save or Apply with nothing bound (both open the same create menu first), or click New. The dialog is New ATT Data Asset and asks for two things — the asset base name and the output path; on disk the asset is named ATT_<base name>. New rebinds to an existing name and never overwrites it; the create path behind Save appends _1/_2 instead.

在 ATT 出现之前,只要模型源已经填好,集合、移动与跳跃的工作副本和骨骼蒙版都能先作者化:面板编辑的是会话里的工作副本,草稿从不直接落盘。创建 ATT 的那一次保存会把它们一起发布上去——这是"先做内容、后建资产"的正规路径。

Before an ATT exists you can still author the sets, the locomotion and jump working copies and the bone masks, provided the model source is set: the panel edits working copies in the session and a draft never reaches the disk by itself. The save that creates the ATT publishes all of them — that is the supported "author first, create the asset later" route.

第一步:填模型源 Step One: Fill In the Model Source

Mesh Source 类别按顺序是 SkeletalMesh、Assembly Template、Physics Asset、RootTransform。两个模型源互斥:填其中一个会清空另一个,被清掉的那一半会在日志里点名,不会悄悄消失。旧资产若同时带着两者,面板会先原样保留、由你决定,但保存时会拒绝两个模型源。

Mesh Source reads SkeletalMesh, Assembly Template, Physics Asset, RootTransform. The two model sources are mutually exclusive: assigning one clears the other, and the dropped half is named in the log rather than disappearing quietly. A legacy asset carrying both is kept as-is for you to decide, but a save refuses two model sources.

行Row 它是什么What it is 填不填Do you fill it
SkeletalMesh 单网格模型源;它同时决定片段筛选用的骨架、移动与跳跃预览的单网格路线The single-mesh model source; it also decides the skeleton clips are filtered by and the single-mesh route the locomotion and jump previews take 与模板二选一。选中的那一刻自动跑名字/路径与物理资产的填充,但不扫描片段One of the two; picking it runs the name/path and physics-asset fill, but does not scan clips
Assembly Template 装配模板 Blueprint,多部件的复合模型源;只接受派生自装配模板类的 BlueprintThe assembly-template Blueprint, i.e. the multi-part composite model source; only Blueprints derived from the template class are offered 与骨骼网格二选一。它只填名字与路径;片段扫描用模板里第一个带骨骼网格的部件来筛选One of the two; it fills names and paths only, and the clip scan filters by the first part that carries a skeletal mesh
Physics Asset 布娃娃与姿势表烘焙用的物理资产The physics asset the ragdoll and pose-table bakes read 随网格自动填入,可以改成别的资产来覆盖;留空则回退到网格自带的。模板模式下没有网格,这一行变空Auto-filled from the mesh; overwrite it to bake from a different asset. Empty falls back to the mesh's own. In template mode there is no mesh, so the row empties
RootTransform 烘焙空间变换:乘进两条路线的已烘动画采样,用来修正模型朝向与单位不一致The bake-space transform multiplied into both lanes' baked animation samples, used to correct a model whose facing disagrees with the unit 模型朝向不对时才动它。它不是运行期渲染器偏移,磁盘上的模型也不会转向;改它必须重烘Touch it only when the model's facing is wrong. It is not a runtime renderer offset and does not re-orient the model on disk; changing it needs a re-bake

三个填充按钮 The Three Fill Buttons

选骨骼网格会立刻跑自动填充链:从模型源推搜索路径,用同一份推导补上 Agent Creator 里还空着的输出名与生成路径,并用网格自带的资产填物理资产行。它不扫描片段——扫描是显式动作,按 Fill Anim 才会发生。选模板走同一套名字/路径推导,只是没有网格可填物理资产。

Picking a skeletal mesh fires the automatic chain at once: it derives the search path from the model source, seeds the Agent Creator's still-empty output name and generate path from the same derivation, and fills the physics row from the mesh's own asset. It does not scan clips — that is an explicit action, Fill Anim. A template runs the same name/path derivation; there is just no mesh to fill the physics row from.

按钮Button 它做什么What it does 前提Precondition
Fill Path 重新从当前模型源推搜索路径,并补上 Creator 里仍为空的输出名与生成路径Re-derives the search path from the current model source and fills the Creator's still-empty output name and generate path 已选一个模型源,否则按钮是灰的A model source is set; otherwise the button is disabled
Fill Anim 按模型源重扫片段,只写进第一个集合的扁平片段数组:每个扫描到的桶落到它相位对应的数组里;其余集合与手填的 Run / Jump / Land / Others 不动Re-scans clips for the model source and writes only into the first set's flat clip arrays: each scanned bucket lands in the array of the phase it addresses, while the other sets and the hand-authored Run / Jump / Land / Others arrays are left alone 已选一个模型源;模板模式要求模板里至少有一个带骨骼网格的部件A model source is set; a template must carry at least one part with a skeletal mesh
Fill BS 在动画搜索路径里找与模型骨架兼容的 1D Blend Space,导入当前移动选项:每个采样变成带自己片段的速度键,转身键保留。正在跑的选项预览决定目标;空区域会先建第一个选项Finds a 1D Blend Space compatible with the model skeleton under the animation search path and imports it into the current locomotion option: each sample becomes a speed key carrying its own clip, and the turn keys are preserved. A running option preview picks the target; an empty region gets its first option 已选一个模型源;一次导入是一步撤销A model source is set; the import is one undo step

离开这一步之前核对两件事:Search Path 指向放动画的目录;片段与模型源是同一套骨架。归错了数组,烘焙出来的动画就会在错误的动作里播;骨架不对的片段在数组里以琥珀色下标标出,悬停会说明原因。

Check two things before leaving this step: Search Path points at the folder holding the animations, and the clips sit on the model source's rig. A clip in the wrong array plays during the wrong action after a bake; a clip on another rig is marked by an amber index in its array, and hovering it explains why.

Texture Params:烘焙直接读的八行 Texture Params: The Eight Rows the Bake Reads

Texture Params 是独立类别,八行值属于模型源资产,烘焙每次直接从这里读,不写进烘焙配方——改完必须重烘才生效。

Texture Params is its own category. Its eight values belong to the model-source asset; every bake reads them straight from here rather than from a bake recipe, so a change only takes effect after a re-bake.

行Row 含义Meaning 默认Default
LightMapUVChannel骨架转静态网格时写光照贴图坐标的 UV 通道,必须避开 VAT 通道与骨骼下标通道UV channel the skeletal-to-static conversion writes lightmap coordinates into; must differ from the VAT channel and the bone-index channel2
VATUVChannelVAT 烘焙写顶点动画的 UV 通道,避开 UV0、光照贴图通道与骨骼下标通道UV channel the VAT bake writes vertex animation into; keep it off UV0, the lightmap channel and the bone-index channel1
VATSampleRateVAT 采样率 Hz;帧数 = 动画长度 × 该值VAT sampling rate in Hz; frame count = animation length x this value30
BoneInfluences烘焙材质解码的骨骼影响数,1 / 2 / 4;烘焙始终写四路权重,这里只选解码宽度Bone influences the baked material decodes: 1, 2 or 4. The bake always writes four weights; this only picks the decode width2
bEnforcePowerOfTwo把烘焙纹理宽高向上取到 2 的幂(留空填充);关闭时按数据精确取尺寸Round the baked texture width/height up to powers of two (blank padding); off sizes them exactly to the data关Off
MaxTextureHeight烘焙纹理高度上限,256 到 16384;烘焙取能装下数据的最小尺寸Max baked texture height, 256 to 16384; the bake picks the smallest size that fits8192
MaxTextureWidth烘焙纹理宽度上限,同上Max baked texture width, same rule8192
TexturePrecision烘焙纹理精度:16 位匹配随包的材质,8 位把纹理减半、损失一点解码精度Baked texture precision: 16 bits matches the shipped materials, 8 halves the texture at some decode precision16 位16 bits

第二步:配动画集合 Step Two: Configure the Animation Sets

Animation 类别里每个集合是一组,组内是 Set Name、Selector、Locomotion、Jump Cycle、Montage 与 AimOffset。类别条右端的三个动作负责集合表本身:加号新增一个集合(集合顺序就是保存时写行的顺序),垃圾桶清空全部集合,复位箭头把列表恢复成空。类别条不显示元素计数。

Inside Animation every set is one group holding Set Name, Selector, Locomotion, Jump Cycle, Montage and AimOffset. Three actions on the category bar own the set list itself: the plus adds a set (set order is the order Save emits rows in), the trash clears every set, and the reset arrow restores the list to empty. The category bar shows no element count.

集合行的标题实时显示当前 Set Name(名字为空时显示 Set N),右侧是元素计数——这个集合里 Locomotion 与 Jump Cycle 的选项总数,1 element / N elements——加一个删除控件。集合行没有复位按钮;删掉整个集合就是它唯一的破坏性动作。

A set row shows the live Set Name in its title (an unnamed set reads Set N), the element count on the right — how many Locomotion and Jump Cycle options this set holds, 1 element / N elements — and a remove control. A set row has no reset; removing the set is its only destructive action.

选择器怎么写 How to Write the Selector

选择器回答"哪些装配组合播这个集合",逗号分隔,一条规则可以是四样东西之一:* 是基底,把它声明了的桶供给每个组合;裸名字按模板里的写法精确匹配且区分大小写;名字* 是前缀;#3 是按烘焙下标指名某个组合。点名某个组合的集合会整桶覆盖自己声明(非空)的那几个桶,基底补剩下的。同一个集合可以混用两种写法(*, King):对 King 是点名,对其余组合是基底。

The selector answers "which assembly combinations play this set". Comma-separated, one rule is one of four things: * is the base, supplying every bucket it declares to every combination; a bare name matches exactly and case-sensitively as the template spells it; name* is a prefix; #3 names one combination by its bake index. A set that names a combination overrides whole buckets for the buckets it declares non-empty, and the base supplies the rest. One set may mix both (*, King): specific for King, a base for everything else.

面板不解析也不校验选择器——它只是文本,规则在烘焙时解析。离开这一步之前用命令层的 MeshPrep.ValidateAnimSets(见下文的命令表)对着模板跑一次;它按烘焙同一套规则逐条报错,而不是等烘焙时才发现。

The panel neither parses nor validates the selector — it is just text, and the grammar is resolved at bake time. Validate before leaving this step: run MeshPrep.ValidateAnimSets (see the command table below) against the template; it applies the bake's own rules and reports every defect up front instead of letting the bake discover them.

校验会报的错What validation reports 含义What it means
集合重名Duplicate set names名字是选择器按名匹配的键,比较不区分大小写;重名让"这个组合播哪份"无解The name is the key a selector matches by name and the comparison ignores case; duplicates make "which set plays this combination" unanswerable
选择器为空An empty selector一条规则都没有(只剩逗号也算空),这个集合匹配不到任何组合Not one rule (separators alone count as empty), so the set reaches no combination
规则匹配不到组合A rule matches no combination裸名字区分大小写;也可能只命中了被禁用的卡,而禁用卡不占烘焙行A bare name is case-sensitive; or the rule only hits disabled cards, and a disabled card occupies no bake row
裸名字命中多张卡A bare name hits several cards精确名字必须唯一识别一个组合;模板重复了名字时先把组合名改唯一An exact name must identify one combination; make the template's combination names unique first
#N 越界#N out of range烘焙下标只数已启用的卡,范围是 #0 到"烘焙行数−1"Bake indices count only enabled cards, so the range is #0 to one less than the bake row count
一个桶被两个集合声明One bucket declared twice要么是两个点名同一组合的集合抢同一个桶,要么是两个 * 基底抢同一个桶——两种情况都裁定不了谁赢Either two combination-named sets claim one bucket, or two * bases do — neither leaves a defined winner
某个组合没有集合服务A combination has no supplier没有集合点名它,也没有 * 基底覆盖它No set names it and no * base covers it
attack 桶为空An empty attack bucket烘焙拒绝留空的攻击桶——那样的单位永远打不出攻击The bake refuses an empty attack bucket — such a unit could never land a hit
集合供给不了任何桶A set supplies no bucket它没有声明任何片段,或者它够不到任何组合——死作者数据It declares no clips, or it reaches no combination — dead authoring data

集合里的片段数组 The Clip Arrays Inside a Set

集合的片段按扁平数组存放,数组名就是它喂的相位。面板为其中七组画了行,全部在 Montage 区域下:Appear、Look、Aim、Attack、Hit、Death、Others。每组的标题行有元素计数、加号(加一条片段)、垃圾桶(清空该数组)与复位箭头;每条片段一行:裸下标、资产选择器(只列出与模型源同骨架的片段)、右侧红色叉删除、复位列清空该值。下标变成琥珀色表示这条片段在别的骨架上,烘焙解不了,悬停会说明是哪两套骨架。

A set's clips live in flat arrays, and the array's name is the phase it feeds. Seven of them get rows in the panel, all under Montage: Appear, Look, Aim, Attack, Hit, Death, Others. Each group's header carries the element count, a plus (add one clip), a trash (clear the array) and a reset arrow; each clip is a row: bare index, an asset picker filtered to clips on the model source's rig, a red cross that removes it, and a reset in the right column. An index turns amber when that clip is on another rig — the bake cannot resolve it, and hovering says which rigs disagree.

数组Arrays 谁读它What reads it 面板里有行吗Rows in the panel
Idle · Walk · Run 这套集合的移动基础带;集合没作者化任何移动选项时,移动状态机画的就是这里The set's locomotion base bands; when the set authors no locomotion option, these are what the locomotion machine draws 没有独立行:活作者面是 Locomotion 区域的选项,这个数组由 Fill Anim 或迁移填入No rows of their own: the live author face is the Locomotion region's options, and Fill Anim or the migration fills these arrays
Jump · Fall · Land 这套集合的跳跃基础带;Jump 是起跳、Fall 是下落循环、Land 是落地The set's jump base bands: Jump is takeoff, Fall the falling loop, Land the landing 没有独立行:活作者面是 Jump Cycle 区域的选项No rows of their own: the live author face is the Jump Cycle region's options
Appear · Look · Aim · Attack · Hit · Death · Others 蒙太奇各相位:出现、注视、瞄准、攻击、受击、死亡与通用蒙太奇。Others 就是 PlayMontage 播的那一段The montage phases: appear, look, aim, attack, hit, death and the generic montage. Others is exactly the band PlayMontage plays 有,见上:Montage 区域下每组一行数组头、若干片段行Yes, as described above: one array header per group under Montage, with clip rows beneath
TurnLeft · TurnRight 原地转身带:站着转身时播,一旦移动就交给移动混合空间;片段必须原地作者化,根旋转要为零Turn-in-place bands: played while standing still, and handed to the locomotion blend space the moment the unit moves. Author them in place with zero root rotation 没有独立行;转身由移动选项自己的转身键驱动No rows; a locomotion option's own turn keys drive the turn

片段放进哪个数组就喂给哪个相位,没有中间层要展开;放错了数组,烘焙出来的动画就会在错误的动作里播。同一条片段可以同时出现在两个集合里:烘焙按片段路径去重,两个集合引用它只算一个动画槽。

The array a clip sits in names the phase it feeds — there is nothing nested to expand — and a clip in the wrong array plays during the wrong action after a bake. One clip may be listed in two sets: the bake dedupes by clip path, so two sets referencing it still consume one animation slot.

动画预算:128 条去重片段 The Animation Budget: 128 Distinct Clips

面板统计的是去重后的已启用片段:每个集合的扁平数组,加上每套集合当前的移动与跳跃工作副本(包括按键持有的片段、2D 采样),同一条片段只算一次。超过 128 条时面板记一行日志并弹出 Animation Limit Exceeded,说明超出的数量与上限;这个草稿仍然可编辑,让你先改再存。Save 与 Apply 也走同一道闸门,超预算时直接拒绝写入资产。

The panel counts distinct enabled clips: every set's flat arrays plus each set's current locomotion and jump working copies (including the clips keys carry and the 2D samples), with one slot per distinct clip. Above 128 it logs a line and opens Animation Limit Exceeded, naming the count and the cap; the over-budget draft stays editable so you can fix it. Save and Apply pass the same gate and refuse to write the asset while over budget.

AimOffset:每套集合自己的瞄准 AimOffset: Each Set's Own Aim

每个集合的 AimOffset 组里只有一行:这一套集合的 additive 瞄准混合空间。留空就是"这套集合没有瞄准",不会自动探测;改它必须重烘。烘焙按不同的来源资产各烘一张网格,引用同一份资产的集合共用一张,集合记录只存指向它的下标。

Each set's AimOffset group holds one row: that set's additive aim blend space. Empty means this set has no aim — it is never auto-detected — and a change requires a re-bake. The bake produces one grid per distinct source asset; sets naming the same asset share one grid, and the set record only stores the index that points at it.

第三步:画移动曲线 Step Three: Draw the Locomotion Curve

Locomotion 区域属于单个集合:每套集合有自己的选项列表,每个选项是一套完整的移动方案(一张画布、可选的混合空间链接、逐采样片段),运行时按 agent 抽一个来画。区域行的四个动作右对齐:播放(预览)、放大镜(Focus)、加号(新增选项)、垃圾桶(清空整个选项列表,一步撤销,不先问)。没有选项时区域体只有一行提示:No bundles yet — press + to add one.

Locomotion belongs to one set: every set owns its option list, and one option is a complete motion alternative (one canvas, an optional blend-space link, per-sample clips) that the runtime draws per agent. The region row's four actions are right-aligned: play (preview), magnifier (Focus), plus (add an option) and trash (delete the whole option list as one undo step, without asking first). With no options the region body holds one hint: No bundles yet — press + to add one.

一个选项展开后是:Option N 标题行加右侧红色叉(删这个选项,后面的选项保留各自的编辑器);Mode 行,二选一 1D Blend Space / 2D Blend Space;一行混合空间链(1D 或 2D,随模式换标签);画布;以及画布之后的坐标轴行。选项的播放片段不在片段行里——每个键自己持有它要播的片段,键在画布上作者化。给这一行指一个混合空间会把它的采样导入成键(1D)或自由采样(2D);清掉链接则保留当前数据供直接编辑;Save 会同时写 ATT 与链接的资产。

Expanded, an option is: the Option N title row with a red cross on its right (removes this option; the later options keep their editors); a Mode row toggling 1D Blend Space / 2D Blend Space; one blend-space link row (1D or 2D, labelled by the mode); the canvas; and the axis rows after it. An option's playback clips are not clip rows — each key owns the clip it plays, and the keys are authored on the canvas. Pointing the row at a blend space imports its samples into keys (1D) or free samples (2D); clearing the link keeps the current data for direct editing; Save writes both the ATT and the linked asset.

1D:速度 / 转身十字 1D: The Speed / Turn Cross

1D 页面是一张十字:横轴是有符号速度(cm/s,负值向后退),右侧竖臂是有符号转身速率(deg/s,正值逆时针即向左,负值顺时针即向右)。速度键锚定速度、转身速率为 0;转身键锚定转身速率、速度为 0——一个键同时带两个非零值会被命令层拒绝,因为十字的两条臂各只读自己那一侧。负速度配负播放速率就是反向播放的写法。

The 1D page is a cross: the horizontal axis is signed speed (cm/s; negative travels backwards), and the vertical arm on the right is signed turn rate (deg/s; positive is counter-clockwise, i.e. left; negative is clockwise, i.e. right). A speed key anchors speed with turn rate 0; a turn key anchors turn rate with speed 0 — a key carrying both non-zero values is refused by the command layer, because each arm reads only its own side. A negative speed with a negative play rate is how reverse playback is authored.

一个键带着片段时画成实心蓝点;还没指定片段时画成空心红圈,提示它还不能烘。速度键按速度升序保存;两个速度键不许同速。画布上转身键每侧只许一个:运行时只会走到某一侧绝对值最小的那个键,第二个同侧的键是到不了的数据。转身键的方向在创建时由符号决定,拖动只改绝对值、不改边,拖出来的速率按整 deg/s 取整。速率太接近 0(小于 1 deg/s)或该侧的轴范围不覆盖它时,画布会在状态行说明,而不是写一个到不了的键。

A key that carries a clip draws as a filled blue dot; one without a clip draws as a hollow red ring, saying it cannot bake yet. Speed keys are stored in ascending speed order and two of them may not share a speed. On the canvas each side of the turn arm takes one key: the runtime only ever reaches a side's smallest-magnitude key, so a second key on the same side would be unreachable data. A turn key's side is fixed by the sign at creation; a drag changes only its magnitude, never which side it sits on, and a dragged rate rounds to whole deg/s. A rate too close to zero (below 1 deg/s), or an axis range that does not cover that side, is explained on the status line instead of writing an unreachable key.

键怎么加、怎么改 Adding and Editing Keys

动作Action 怎么做How 结果What happens
加一个空键Add an empty key 在画布空白处双击(单击只负责聚焦与选择);转身臂空白处双击加一个转身键Double-click empty canvas space (a single click only focuses and selects); double-clicking empty turn-arm space adds a turn key 在点击处放一个不带片段的键,画成空心红圈;片段稍后从键自己的菜单里指定Places a key with no clip where you clicked, drawn as a hollow red ring; its clip is assigned later from the key's own menu
拖一个片段进来Drop an animation 把动画资产拖到画布上:空处落一个新键,键上落则替换该键的片段Drag an animation asset onto the canvas: empty space places a new key, dropping onto a key replaces that key's clip 新键带上拖进来的片段;落点若正好被占,键会落到最近空闲的速度上,而不是这次拖放毫无结果The new key carries the dropped clip; if the spot is taken, the key lands at the nearest free speed instead of the drop doing nothing
改数值与片段Edit values and clip 右键一个速度键:Cut / Copy / Delete,加片段选择器、X 与 PlayRate;右键一个转身键:Delete,加片段选择器、Left rate / Right rate 与 PlayRateRight-click a speed key: Cut / Copy / Delete, plus a clip picker, X and PlayRate; right-click a turn key: Delete, plus a clip picker, Left rate / Right rate and PlayRate 字段一提交就写入;表单只改打开它的那一个键。速度键的 X 是速度,转身键的速率只填绝对值,边由它所在的那半条臂决定Each field writes when it commits and the form only edits the key it was opened on. A speed key's X is its speed; a turn key's rate takes a magnitude only — its side is the half of the arm it sits on
拖动Drag 左键拖一个键;按住 Shift 强制吸附到网格;拖动中只改画布上的临时副本Left-drag a key; hold Shift to force grid snapping; the drag updates only a temporary copy on the canvas 整张键表在按钮抬起时一次写入;拖动过程中一个字都不写。被拒的写入会把画布弹回草稿实际持有的值The key list is written once on button-up; nothing is written while the mouse moves. A refused write springs the canvas back to what the draft actually holds
删除Delete 键的右键菜单里的 Delete(画布菜单里的 Delete 删当前选中的键)Delete in the key's own menu (the canvas menu's Delete removes the currently selected key) 删一个键是一次写入;删除会立即提交,没有确认框Removing one key is one write; it commits immediately, with no confirmation
吸附Snap 工具栏最左的 Snap 切换(2D 页面是 Snap X / Snap Y 两个);按住 Shift 在拖动时临时强制吸附The toolbar's leftmost Snap toggle (the 2D page has Snap X / Snap Y); holding Shift forces snapping during a drag 吸附的阶梯就是坐标轴行里的 Grid Divisions;它按轴分别保存,开关与轴行永远说的是同一个状态。转身臂没有阶梯,它按整 deg/s 取整The snapping ladder is the axis rows' Grid Divisions; it is stored per axis, so the toggle and the axis row always describe the same state. The turn arm has no ladder and rounds to whole deg/s
看全貌See the whole page 2D 页面工具栏有 Stretch Grid to Fit:把网格铺满整页,而不是按最大轴等比缩放The 2D toolbar has Stretch Grid to Fit: fill the page with the grid instead of fitting the largest axis 只影响画布的映射,不改任何数据;1D 页面没有缩放或适配控件Changes the canvas mapping only, never data; the 1D page has no zoom or fit control

画布下面的坐标轴行 The Axis Rows Below the Canvas

坐标轴参数是画布之后的普通行,也是它们唯一的作者入口:画布按这里的范围绘制,并把每一次放置钳进这个范围。1D 页面是 Speed Grid Divisions、Speed Range(两个框一行)与 Turn Range(只有范围,没有阶梯);2D 页面是合并的 Grid Divisions XY(X 与 Y 并列,一次复位同时恢复两条阶梯),再是 X Range 与 Y Range。每行右端的复位箭头把该轴恢复成声明默认值:网格 1 到 64,范围两端按轴各自的默认。

The axis parameters are ordinary rows after the canvas and are their only authoring home: the canvas draws over these ranges and clamps every placement to them. The 1D page has Speed Grid Divisions, Speed Range (two boxes on one row) and Turn Range (a range only, no ladder); the 2D page has the merged Grid Divisions XY (X and Y side by side, one reset restores both ladders), then X Range and Y Range. Each row's reset arrow restores that axis to its declared default: grids run 1 to 64, and each range has its own axis default.

预览点怎么拖 Scrubbing the Preview Point

移动预览跑着时,区域底部的状态行会提示:按住 Control 拖画布设置预览点,转身行下面的条带擦洗转身速率——Shift 同样能起手,直接抓住那颗绿色圆点则不需要任何修饰键。预览点只钳进轴范围、不吸附,所以拖起来是连续的速度扫掠;画布上同时画出圆点与读数(2D 还带方向)。两条臂是两次演示,只有正在被驱动的那条在跑:拉速度臂会把转身清零,擦洗转身臂会把速度清零。

While the locomotion preview runs, the region's status line reads: hold Control and drag the canvas to set the preview point; the strip under the turn rows scrubs the turn rate — Shift also starts the gesture, and grabbing the green marker directly needs no modifier at all. The preview point is clamped to the axis range but never snapped, so scrubbing reads as a continuous speed sweep; the canvas draws the marker and its readout (plus the direction on the 2D page). The two arms are two demos and only the one being driven runs: pulling the speed arm zeroes the turn, scrubbing the turn arm zeroes the speed.

区域状态行只在失败时说话(格式是 Code: 消息),成功即清空;预览跑着时它还会顶上一行擦洗提示,失败永远优先,检查提示不会盖住出了什么事。

The region's status line speaks only on failure (as Code: message) and clears on success; while a preview runs it also carries the scrub hint, and a failure always wins — guidance never covers what went wrong.

2D:自由采样空间 2D: The Free-Sample Space

2D 页面把 X 当速度(cm/s)、Y 当相对朝向的方向(度,0 = 正前,+90 = 右侧,闭合成 ±180)。采样是自由摆放的,不是矩形网格:烘焙对它们做三角剖分,运行时按输入落在哪个三角形里混合三个顶点,所以作者把采样放在动作真正发生的位置。方向在写入前折进 [-180, 180),+180 与 -180 是同一个方向。

The 2D page treats X as speed (cm/s) and Y as direction relative to facing (degrees; 0 = forward, +90 = right, closed at ±180). Samples are placed freely rather than on a rectangle: the bake triangulates them and the runtime blends the three vertices of the triangle the input lands in, so authors place samples where the motion actually happens. The direction is folded into [-180, 180) before it is written; +180 and -180 name one direction.

交互与 1D 同源:空白处双击加一个空采样,拖动画进来在空处加采样、在采样上替换片段;右键采样是 Cut / Copy / Delete 加 X / Y / PlayRate 表单;右键空白处是 Paste / Delete 与视图开关。拖动同样在抬手时才写入,按住 Shift 强制吸附。工具栏的 Show Triangulation 画出 Delaunay 三角形,Show Sample Names 在采样旁写出片段名。位置重复的采样会被拒绝(消息会点名是哪两个下标)。

Interaction matches 1D: double-click empty space to add an empty sample; drag an animation in to add one on empty space or replace a sample's clip; right-clicking a sample offers Cut / Copy / Delete plus the X / Y / PlayRate form; right-clicking empty space offers Paste / Delete and the view switches. A drag writes on release and holding Shift forces snapping. The toolbar's Show Triangulation draws the Delaunay triangles and Show Sample Names writes each sample's clip name beside it. Samples sharing a position are refused, and the message names the two indices.

2D 空间至少要三条采样、位置不能重复、并且必须能三角剖分,否则烘焙拒绝;一个选项最多 64 条采样。X Range 与 Y Range 决定画布矩形与采样可占的范围;预览输入是速度 + 方向两个量,命令层用 MeshPrep.Loco2D.SetPreviewInput 写入同一份预览状态。

A 2D space needs at least three samples, no duplicate positions and a successful triangulation, or the bake refuses it; one option holds at most 64 samples. X Range and Y Range set the canvas rectangle and the bounds a sample may occupy; the preview input is speed + direction, and the command layer writes the same preview state through MeshPrep.Loco2D.SetPreviewInput.

第四步:配跳跃 Step Four: Configure the Jump Cycle

Jump Cycle 也属于单个集合,动作行与 Locomotion 相同的四个芯片:播放、Focus、加号、垃圾桶。加号新建一个空的三片段选项,三个片段通过组里的三行资产字段填。如果这套集合原本没有任何选项,打开区域时它会先出现一个从资产块同下标项起步的选项(旧资产留下的预置项),加号是在它之后追加。没有选项时同样只有一行 No bundles yet — press + to add one.

Jump Cycle also belongs to one set, with the same four chips on its row: play, Focus, plus, trash. The plus adds an empty three-clip option whose clips are filled through the group's three asset rows. When the set had no options at all, opening the region first shows one option seeded from the block's entry at that set's index (an old asset's pre-set item), and the plus appends after it. With no options it shows the same one-line hint, No bundles yet — press + to add one.

每个选项展开后是 Option N 标题行(右侧红色叉删除)与三行固定相位:Jump、Falling、Landing。每行是一个资产选择器,只列出与模型源同骨架的动画;这一行的候选不按段过滤——落地用的片段可能就是 Attack 段里的那一条。空相位表示"这里没作者化过":下次烘焙不动该相位在单位配置里的条目,旧配置因此保持原行为。

An option expands to the Option N title row (removed by its red cross) and three fixed phase rows: Jump, Falling and Landing. Each row is an asset picker listing only animations on the model source's rig; the candidates are not filtered by band — the landing clip may well be the one sitting in the Attack array. An empty phase means "not authored here": the next bake leaves that phase's entry in the unit config alone, so an older config keeps its behaviour.

跳跃预览按原地循环三个相位,前提是至少一个相位填了片段——一个片段都没有的循环会立刻结束,所以工具会先拒绝并说明。集合自己的 Jump / Fall / Land 数组是这套集合的基础带,选项列表才是活作者面。

The jump preview loops the three phases in place, and it requires at least one filled phase — a cycle with no clip at all would finish instantly, so the tool refuses it up front and says why. The set's own Jump / Fall / Land arrays are its base bands; the option list is the live author face.

第五步:配骨骼蒙版 Step Five: Configure the Bone Masks

Bone Masks 是面板的最后一个类别,两组原生组:Jump Cycle(Jump、Falling、Landing)与 Montage(Appear、Attack、Hit、Death、Others)。每个相位一行:一个可搜索的骨骼选择器(None 在第一项,表示整个身体)、一个 Blend Depth(0 到 4),以及下方灰色的覆盖读数。

Bone Masks is the panel's last category, with two native groups: Jump Cycle (Jump, Falling, Landing) and Montage (Appear, Attack, Hit, Death, Others). Each phase is one row: a searchable bone picker (None is the first entry and means the whole body), a Blend Depth (0 to 4), and a grey coverage readout below.

蒙版说"这条相位只驱动这几根骨骼的子树,其余身体继续播移动"。一个蒙版都没有时,每个相位都驱动全身,与蒙版出现之前完全一样。挑中的骨骼会连同它的所有后代一起被驱动;Blend Depth 只决定子树内部的羽化:0 与 1 是硬边,2 让根骨拿 50%,3 拿 33%,4 拿 25%。所以深度改变权重,不改变这个蒙版覆盖多少根骨骼。

A mask says "this phase drives these bones' subtrees while the rest of the body keeps playing locomotion". With no mask at all, every phase drives the whole body, exactly as before masks existed. The picked bone and all its descendants follow the phase; Blend Depth only shapes the feather inside that subtree: 0 and 1 are a hard edge, 2 puts the root at 50%, 3 at 33%, 4 at 25%. Depth therefore changes weights, never how many bones the mask covers.

覆盖读数长这样:covers N / M bones;深度大于 1 时追加 · root X%,告诉你根骨自己的权重。它按源网格的原始参考骨架计算,所以不需要先烘焙就能看到覆盖面。骨骼选择器只列原始参考骨骼——socket 与虚拟骨骼不在名单里,烘焙也解不了它们。

The coverage readout reads covers N / M bones, and when the depth is above 1 it appends · root X% for the root's own weight. It is computed from the source mesh's raw reference skeleton, so the coverage is visible before any bake. The picker lists raw reference bones only — sockets and virtual bones are not offered, and the bake cannot resolve them either.

骨骼蒙版需要骨骼网格模型源:模板源没有可列骨架,行会禁用,状态行提示先选一个骨骼网格。编辑落在面板的工作副本上,Save 才发布到 ATT;面板只编辑某个相位的第 0 个根,当一个相位带着多个根时状态行会点名,并提醒这里的任何编辑都会替换掉该相位的全部根。改完同样要重烘才生效。

Bone masks need a skeletal mesh model source: a template has no skeleton to list, so the rows are disabled and the status line asks for a skeletal mesh first. Edits land on the panel's working copy; Save publishes them onto the ATT. The panel edits a phase's root 0 only, so when a phase holds several roots the status line names it and warns that any edit here replaces every root of that phase. A re-bake is required for a change to take effect.

这个面板不作者化通知与同步标记 This Panel Does Not Author Notifies or Sync Markers

Mesh Prep 的每一行都在回答"哪条片段属于哪个相位 / 哪个键",它没有逐片段的通知行,也没有同步标记行。片段上的自定义帧区间(是否启用、起止帧)同样不在这个面板里——那些字段住在 ATT 的片段行上,用 ATT 自己的详情视图改。通知事件与同步标记由烘焙从片段本身采集:每条片段的通知轨道收成事件行,同步轨道收成标记行,所以在这条片段上改完通知,回到这里只需要确认片段归属没变,然后重烘。

Every row in Mesh Prep answers "which clip belongs to which phase / key"; it has no per-clip notify rows and no sync-marker rows. A clip's custom frame range (whether it is enabled, its start and end frames) is not surfaced here either — those fields live on the ATT's clip rows and are edited in the ATT's own details view. Notify events and sync markers are harvested from the clips by the bake: each clip's notify track becomes event rows and its sync track becomes marker rows, so after changing notifies on a clip you only need to confirm here that clip membership did not move, then re-bake.

如果一句"这条片段的某个时间点该触发什么"找不到落点,那是别处的作者面,不是漏了这一节。本页只负责把片段摆对位置。

If you are looking for "what should fire at this instant of this clip" and cannot find a home for it, that authoring surface is elsewhere — nothing is missing from this section. This page only places clips.

第六步:预览 Step Six: Preview

Locomotion 与 Jump Cycle 两个区域条上各有一个播放按钮,标签一样,行为按位置分工:Locomotion 上的是移动演示,Jump Cycle 上的是跳跃演示。按一下的行为取决于当前状态——预览停着就启动这一种;另一种在跑就切过去(不重生成、不瞬移);自己的模式正在跑就停掉。正在跑的那一种按钮会亮成绿色,一眼能看出哪个在循环。两个区域条上还有 Focus:把正在跑的预览框到每个视口里;没有预览在跑时它不可用。

The Locomotion and Jump Cycle region rows each carry a play button with the same label, and the location decides the mode: the one on Locomotion drives the locomotion demo, the one on Jump Cycle drives the jump demo. What a press does depends on the current state — with nothing running it starts that mode; with the other mode running it switches (no respawn, no teleport); with its own mode already running it stops. The running mode's button turns green, so which loop is live is visible at a glance. Both region rows also carry Focus: it frames the running preview in every viewport, and is unavailable when no preview runs.

启动的前提是:已绑定 ATT 或已有移动草稿,并且有模型源。模型源是骨骼网格时,预览 Actor 生成在视口焦点下方并落到地面上,脚下铺一张瞬态网格平面——判断脚底打滑就是对着这张固定表面看。模型源是模板时走复合预览:它驱动 Assembly 面板的实时预览(你在那里看到的同一套部件组合),所以那个面板必须开着,并且绑到同一份模板上。

Starting requires a bound ATT or a locomotion draft, plus a model source. With a skeletal mesh, the preview actor spawns under the viewport focus and drops onto the ground, with a transient grid plane laid just beneath — judging foot sliding means watching the feet against that fixed surface. With a template, the composite route drives the Assembly panel's live preview (the same part composition you see there), so that panel must be open and bound to the same template.

Montage 区域条上的播放按钮是灰的:蒙太奇暂时没有自己的预览,预览 Actor 只播移动曲线或跳跃循环;那一行另有 Focus,和别处一样只在预览在跑时可用。跳跃预览原地循环三个相位,且要求至少一个相位填了片段;一个片段都没有时按钮不可用,提示会告诉你去哪三行填。

The play button on the Montage region row is disabled: montage has no preview of its own yet — the preview actor plays a locomotion curve or the jump cycle; that row also carries Focus, available only while a preview runs, like the others. The jump preview loops the three phases in place and requires at least one filled phase; with no clip at all the button is unavailable and the tooltip says which three rows to fill.

移动演示正在跑时,在画布上按住 Control(Shift 同样可以)拖动会擦洗预览速度;2D 页面同时擦洗方向;转身行下面的条带擦洗转身速率。想完整看一次跳跃循环,用命令 MeshPrep.Preview.Jump——面板上没有这个一次性按钮。任何改绑、载入、清空、撤销或模型源切换都会先停掉预览,否则 Actor 会继续显示上一个源。

While the locomotion demo runs, hold Control (Shift works too) and drag the canvas to scrub the preview speed; the 2D page scrubs direction as well, and the strip under the turn rows scrubs the turn rate. To play one complete jump cycle use the MeshPrep.Preview.Jump command — there is no one-shot button on the panel. Any rebind, load, clear, undo or model-source swap stops the preview first, so the actor cannot keep showing the previous source.

验收要看三件事:速度跨过换片段处时有没有跳变;某个速度下脚底相对网格平面的滑动是否可以接受;跳跃三个相位之间的衔接是否连贯。这三样只有靠眼睛判断,图上看不出来。

Three things to watch: whether a pop appears where the speed crosses into another clip; whether foot sliding against the grid plane is acceptable at a given speed; whether the three jump phases join cleanly. All three need eyes — the plot cannot show them.

第七步:保存、应用、载入、清空 Step Seven: Save, Apply, Load, Clear

按钮Button 它做什么What it does 什么时候用When to use it
Save 把模型源、集合表(名字 + 选择器 + 各自的瞄准资产与移动/跳跃选项)、片段行、骨骼蒙版与烘焙参数写进 ATT 并存盘;当前激活模式所链接的混合空间也会被写回并保存。未绑定资产时先弹创建菜单。橙黄的 Save * 加一颗黄星表示有未保存改动,绿色表示面板与磁盘一致Writes the model source, the set table (name + selector + each set's aim asset and locomotion/jump options), the clip rows, the bone masks and the bake parameters onto the ATT and saves it; the blend space linked by the active mode is written back and saved too. With nothing bound it opens the create menu first. An amber Save * plus a star means unsaved changes; green means the panel and the disk agree 只想把手上的作者化落盘时When you want the current authoring on disk
Apply 先做 Save 那一整套,然后把 ATT 与片段搜索路径交给 Agent Creator,切到模型源对应的烘焙程序,并按模型源补上 Creator 里还空着的输出名与生成路径;Creator 没开就把它打开。最后把 Creator 提到前面并报告交接完成Does everything Save does, then hands the ATT and the clip search path to the Agent Creator, switches it to the bake program the source implies, and seeds its still-empty output name and generate path from the source; it opens the Creator when closed. It then brings the Creator forward and reports the hand-over 准备去生成产物时——烘焙就是 Creator 里的 GenerateWhen you are ready to produce the assets — the bake is Generate in the Creator
Load 从已绑定 ATT 重载模型源、集合表、蒙版与烘焙参数,算一步撤销;未绑定资产时在日志里说一句,面板内容保留。命令层的 Load 可以命名一份 ATT,那就是改绑并载入Reloads the model source, set table, masks and bake parameters from the bound ATT as one undo step; with nothing bound it logs a line and keeps what the panel shows. The command-layer Load can name an ATT, which binds and loads it 确认磁盘上的版本仍然是你想要的之后After you have decided the version on disk is the one you want
Clear 清空面板并解除资产链接,磁盘不动;只在 Creator 正指向被清掉的这份资产时才顺带解绑。模型源、烘焙参数等作者字段恢复成类声明默认值,集合列表清空后留下与全新面板相同的一个空集合占位,工作副本全部重置Empties the panel and drops the asset link; the disk is untouched. The Creator is unbound only when it pointed at the very asset cleared here. Authored fields such as the model source and the bake parameters return to the class's declared defaults, the set list is cleared and then holds the same one empty set placeholder a fresh panel shows, and every working copy is reset 换一个单位重做时When starting over with a different unit

工作副本的发布只有一处:面板编辑的是会话里的工作副本(移动选项、跳跃选项、骨骼蒙版);Save / Apply 把它们一起写到绑定的 ATT 上,包括每套集合自己的选项列表、各自的瞄准资产与蒙版。块级的移动/跳跃预置列表不会被改写——它们只是旧资产迁移用的来源;移动块里唯一被写回的是转身速度门。链接的混合空间按当前模式写回:1D 选项写 1D 资产,2D 选项写 2D 资产,惰性的那一侧保持原样。

There is exactly one place working copies become asset data: the panel edits working copies in the session (locomotion options, jump options, bone masks); Save / Apply write all of them onto the bound ATT, including each set's own option lists, its aim asset and the masks. The block-level locomotion/jump pre-set lists are never rewritten — they are only the migration source for old assets — and the one part of the locomotion block written back is the turn-in-place speed gate. A linked blend space is written back for the live mode only: a 1D option writes its 1D asset, a 2D option writes its 2D asset, and the inert side is left untouched.

Apply 与命令层的分工值得记一句:面板上的 Apply 在 Creator 没开时会自己把它打开;命令 MeshPrep.Apply 不会开窗口,Creator 没开就直接拒绝。Save 在 Creator 开着时也会做同一次绑定(资产、搜索路径、空的输出名与生成路径),只是不把它提到前面;Creator 没开时 Save 照样落盘,只在日志里提示去打开它。

One split between the button and the command is worth remembering: the panel's Apply opens the Creator itself when it is closed, while the MeshPrep.Apply command never spawns a window and refuses when the Creator is closed. Save also performs the same Creator binding when the Creator is open (asset, search path, still-empty output name and generate path); it just does not bring it to the front. With the Creator closed, Save still lands on disk and only logs a line telling you to open it.

写入路径也分得清:移动选项、跳跃选项与骨骼蒙版既有命令的 asset 目标(直接写 ATT 并保存),也有面板的 Save;每套集合的瞄准资产可以走 MeshPrep.Configure(按 set 打补丁)或 MeshPrep.SetAnimSets(随集合表整份写),也可以由 Save 发布。

The write paths are distinguishable too: locomotion options, jump options and bone masks each have a command asset target (writes the ATT and saves it) as well as the panel's Save; a set's aim asset can go through MeshPrep.Configure (a per-set patch) or MeshPrep.SetAnimSets (written with the whole set table), and Save publishes it as well.

关闭面板时如果有未保存改动,会问一次 Yes / No / Cancel:Yes 先保存(没绑定资产时这一步会创建 ATT),No 丢弃并关闭,Cancel 留着页签。保存真的落地了才关;创建菜单被取消或写入失败时,面板保持脏状态、页签不关。

Closing with unsaved changes asks once with Yes / No / Cancel: Yes saves first (with nothing bound that step creates the ATT), No discards and closes, Cancel keeps the tab. The tab closes only when the save actually landed; a cancelled create menu or a failed write leaves the panel dirty and the tab open.

重烘会填什么 What a Re-bake Fills In

Mesh Prep 写的是作者数据,Generate 写的是产物。理解这条分界,就理解了为什么单位配置上有些行看起来是只读的:它们是上一次烘焙写进去的,再改也活不过下一次 Generate。

Mesh Prep writes authoring data; Generate writes products. That boundary explains why some rows on the unit config look read-only: the last bake wrote them, and an edit there does not survive the next Generate.

你在 Mesh Prep 填You author in Mesh Prep 烘焙写到哪里The bake writes it into 为什么Why it works that way
动画集合、每套集合的移动与跳跃选项、片段Animation sets, each set's locomotion and jump options, and the clips 单位配置的动画表:每条片段拿到烘焙分配的(桶, 槽),每套集合的选项与曲线按集发布,运行时按 agent 抽一套来播The unit config's animation table: every clip gets a bake-assigned (bucket, slot), each set's options and curves are published per set, and the runtime draws one set per agent 槽号是烘焙算出来的,不是作者写的;片段池按路径去重,两个集合引用同一条片段只占一个槽Slot numbers are computed by the bake, not authored; the clip pool dedupes by path, so two sets referencing one clip consume one slot
每套集合的移动键、转身键、2D 采样与坐标轴Each set's speed keys, turn keys, 2D samples and axes 该集合的运行时移动数据:按键序列与采样三角剖分发布,运行时按当前速度与转身速率求值That set's runtime locomotion payload: the key list and the sample triangulation are published, and the runtime evaluates them at the current speed and turn rate 配置里那一份是产物;直接改它,下一次烘焙会被 ATT 的内容覆盖The copy on the config is a product; edit it directly and the next bake overwrites it from the ATT
每套集合的瞄准资产Each set's aim asset 按不同的来源资产各烘一张瞄准网格;集合记录存指向网格的下标,同一份资产被多套集合引用时共用一张One aim grid per distinct source asset; the set record stores an index into the grid table, and sets naming the same asset share one grid 留空就是这套集合没有瞄准,烘焙不给它网格;改瞄准资产必须重烘Empty means the set has no aim and the bake gives it no grid; changing the aim asset needs a re-bake
骨骼蒙版Bone masks 每个有根的相位一行蒙版,发布进每个被列出的单位配置;渲染路径按行把权重乘进该相位的覆盖层One mask row per authored phase, published into every listed unit config; the render path multiplies that row into the phase's overlay weight 没有任何蒙版就没有蒙版表,全身照旧——旧资产的姿势逐位不变No mask at all means no mask table and the whole body as before — an old asset keeps byte-identical poses
Texture Params 里那八项The eight Texture Params rows 烘焙直接从这里读,烘成 VAT 纹理与材质实例Read straight by the bake and turned into the VAT textures and material instances 它们属于模型源资产,不写进烘焙配方,所以每次烘焙都以这里的值为准——改完必须重烘才生效They belong to the model-source asset and are not part of the bake recipe, so every bake uses the values here — a change only takes effect after a re-bake
(面板不显示)ATT 上生成的表、纹理与静态网格(Not shown) The generated tables, textures and static mesh on the ATT 由 Generate 写入,名字与位置见 Authoring & BakingWritten by Generate; names and locations are in Authoring & Baking 对美术是噪音,所以面板在幕后读写它们,一个都不显示Noise to an artist, so the panel reads and writes them behind the scenes and shows none of them

结论:要改动画归属、曲线、跳跃、蒙版或烘焙参数,回到 Mesh Prep;要改单位配置上的呈现,那本来就不是手填的地方。需要确认单位实际会读到什么,用只读探针 MassBattle.Loco.List 与 MassBattle.Loco.Evaluate 读配置那一侧。

The rule: to change clip membership, a curve, the jump, masks or the bake inputs, come back to Mesh Prep; the presentation copy on the unit config was never meant to be hand-edited. To confirm what the unit actually reads, use the read-only probes MassBattle.Loco.List and MassBattle.Loco.Evaluate on the config side.

按钮背后的命令 The Commands Behind the Buttons

面板上的动作用命令层也能表达:能给出"会写什么"计划的写命令与按钮共用同一批实现,所以两者的结果不可能不一样。想用脚本或 AI 驱动同一套流程时,走下面这些 id。两类目标要分清:asset 直接写并保存命名的 ATT;draft 写开着的 Mesh Prep 面板里的工作副本、不保存,发布仍然只有面板的 Save。只读的读命令不需要 dry run。不支持 dry run 的写命令只有两类:必须落盘才能成立的(新建资产、载入/改绑、应用、打补丁并保存),以及直接改活面板或场景状态的(面板草稿、预览、清空/重置)——它们没有不产生副作用的计划可报。

The panel's actions are expressible through the command layer too: the writers that can report a "what would be written" plan share their implementations with the buttons, so the two cannot disagree. To drive the same flow from a script or an AI agent, use the ids below. Two targets matter: asset writes and saves the named ATT; draft writes the working copy inside the open Mesh Prep panel and saves nothing, with that panel's Save still the only publisher. Read-only commands need no dry run. The writers that refuse one fall into two groups: those that must reach the disk to mean anything (creating an asset, loading/rebinding, applying, patching and saving), and those that write the live panel or scene state (panel drafts, preview, clear/reset) — neither has a side-effect-free plan to report.

族Family 命令Commands 要点Notes
资产与面板Asset and panel MeshPrep.NewSource · .Load · .Save · .Apply · .Configure · .GetState · .ResetDrafts · .Clear · .FillAnims NewSource 要 path + name;Load 可选 assetPath,面板必须开着;Save 可选 assetPath 且支持 dry run;Apply 要 Creator 开着;Configure 要 assetPath,可打模型源、Idle/Move 桶、搜索路径、物理资产、按 set 的瞄准、烘焙参数与根变换;GetState 读活面板的脏标记、集合数、每集瞄准、片段计数与上限;ResetDrafts 丢掉工作副本并从资产重种;Clear 清空面板并解链;FillAnims 给 assetPath 时扫描并保存,不给时只填活面板的视图NewSource takes path + name; Load takes an optional assetPath and needs the panel open; Save takes an optional assetPath and supports dry run; Apply needs the Creator open; Configure requires assetPath and can patch the model source, the Idle/Move buckets, the search path, the physics asset, the per-set aim, the bake parameters and the root transform; GetState reads the live panel's dirty flags, set count, per-set aim, clip count and cap; ResetDrafts discards the working copies and reseeds them from the asset; Clear empties the panel and drops its link; FillAnims with assetPath scans and saves, without it fills only the live panel's view
集合表Set table MeshPrep.GetAnimSets · .SetAnimSets · .ValidateAnimSets Get 与 Set 共用同一份 sets 形状(名字、选择器、瞄准、桶数组、移动/跳跃项),Set 支持 mode=replace|append 与 dryRun,写前整表校验,坏一处就整次拒绝;Validate 要 asset + template,按烘焙规则逐条报选择器、桶归属与空攻击桶的问题Get and Set share one sets shape (name, selector, aim, bucket arrays, locomotion/jump items); Set supports mode=replace|append and dryRun, validates the whole table first and refuses the call on any bad entry; Validate takes asset + template and reports selector, bucket-ownership and empty-attack-bucket defects by the bake's rules
移动(1D 与通用)Locomotion (1D and shared) MeshPrep.Loco.List · .SetClip · .AddKey · .SetKey · .SetKeys · .SetAxis · .RemoveKey · .ClearKeys · .SeedThreeBand · .SetDraft · .GetDraft · .AddItem · .RemoveItem · .ImportBlendSpace · .FillBlendSpace 写命令都按 set + item 寻址,kind 0..4(Idle / Walk / Run / TurnLeft / TurnRight);除 List 与 GetDraft 外都改数据,其中面向资产的那批支持 dry run,而 SetDraft / AddItem / RemoveItem / ImportBlendSpace / FillBlendSpace 只编辑活面板、不支持 dry run。键的规则:一条臂只带一个非零锚点、同速与同转身速率唯一、曲线最多 64 个键Writers address one item by set + item, with kind 0..4 (Idle / Walk / Run / TurnLeft / TurnRight). Everything but List and GetDraft changes data: the asset-facing writers support dry run, while SetDraft / AddItem / RemoveItem / ImportBlendSpace / FillBlendSpace edit the live panel only and do not. Key rules: one arm carries one non-zero anchor, speeds and turn rates are unique, and one curve holds at most 64 keys
移动(2D)Locomotion (2D) MeshPrep.Loco2D.SetMode · .AddSample · .SetSample · .SetSamples · .RemoveSample · .Clear · .Import · .List · .SetPreviewInput 全部写开着的面板里的 2D 工作副本:kind 0 = Samples1D、1 = Samples2D;采样是 x(cm/s,可为负但运行期只问非负速度)、y(度,折进 [-180, 180))、playRate、clipPath;位置重复会被拒绝,最多 64 条。除 List 与 SetPreviewInput 外支持 dry run;SetPreviewInput 只写预览状态All write the 2D working copy in the open panel: kind 0 = Samples1D, 1 = Samples2D; a sample is x (cm/s, may be negative though the runtime only asks for a non-negative speed), y (degrees, folded into [-180, 180)), playRate and clipPath; duplicate positions are refused and the space holds at most 64 samples. All but List and SetPreviewInput support dry run; SetPreviewInput writes preview state only
跳跃Jump MeshPrep.Jump.List · .SetClip · .ClearClip · .AddItem · .RemoveItem phase 取 jumpstart / fallingloop / land,大小写不敏感;SetClip 永不清空,ClearClip 才是清空面。面向资产时片段必须是本 ATT 的片段行;SetClip / ClearClip 支持 dry run,AddItem / RemoveItem 只编辑活面板phase is jumpstart / fallingloop / land, case-insensitive; SetClip never clears — ClearClip is the clear surface. On an asset write the clip must be one of this ATT's clip rows; SetClip / ClearClip support dry run, AddItem / RemoveItem edit the live panel only
骨骼蒙版Bone masks MeshPrep.BoneMask.List · .SetMask · .ClearMask phase 取 JumpStart / FallingLoop / Land / Appear / Attack / Hit / Death / Others,大小写不敏感;bone 必须是源网格的原始参考骨骼,depth 0..4。SetMask 把该相位替换成一个根;ClearMask 清回全身;两个写命令都支持 dry runphase is JumpStart / FallingLoop / Land / Appear / Attack / Hit / Death / Others, case-insensitive; bone must be a raw reference bone of the source mesh, and depth is 0..4. SetMask replaces the phase with one root; ClearMask clears back to the whole body; both writers support dry run
预览Preview MeshPrep.Preview.Start · .SetMode · .Stop · .SetSpeed · .SetTurnRate · .Jump · .Focus 全部不支持 dry run(它们驱动场景里的 Actor 或写活预览状态)。Start 的 speed 默认 300 cm/s、mode 取 locomotion / jump;SetSpeed 与 SetTurnRate 在预览停着时也能存下来给下次用;Jump 是跑一次跳跃循环,不改模式;Focus 要求预览在跑None supports dry run (they drive a scene actor or write live preview state). Start defaults speed to 300 cm/s and mode to locomotion / jump; SetSpeed and SetTurnRate also store while the preview is stopped, for the next start; Jump plays one jump cycle without changing the mode; Focus requires a running preview
只读探针(单位配置已烘的那一侧)Read-only probes (the baked side on the unit config) MassBattle.Loco.List · MassBattle.Loco.Evaluate 按某个速度与转身速率跑一次真实求值,报出权重与上下两侧用的片段;空列表表示那份配置还在走遗留的两点路径Runs the real evaluator at one speed and turn rate and reports the weight plus the clips on both sides; an empty list means that config is still on the legacy two-point path

两个按钮没有自己的命令:Fill Path 没有单独的命令 id——它的实现通过 MeshPrep.Configure 可达,MeshPrep.Apply 与 MeshPrep.FillAnims 在带 assetPath 时也走同一份推导(给了模型源就重推搜索路径,给了 searchPath 则以你给的为准)。Fill BS 也不是独立命令:面板调用的是 MeshPrep.Loco.FillBlendSpace。面板专属的动作(清空面板、重置草稿)同样有命令,但它们显式命名为 MeshPrep.Clear 与 MeshPrep.ResetDrafts,并且要求面板开着。

Two buttons have no command of their own: Fill Path has no separate id — its body is reachable through MeshPrep.Configure, and MeshPrep.Apply and MeshPrep.FillAnims run the same derivation when they name an assetPath (a model source re-derives the search path, and a supplied searchPath wins). Fill BS is not a separate command either: the panel calls MeshPrep.Loco.FillBlendSpace. Panel-only actions (emptying the panel, resetting the drafts) do have commands, but they are explicitly named MeshPrep.Clear and MeshPrep.ResetDrafts and require the panel to be open.

常见错误 Common Mistakes

下面每一条都对应一条真实会出现的拒绝(命令结果码或状态行文本)。按"现象 → 原因 → 处理"读。NoChange 不是失败:它表示目标已经持有你要求的那个值,重复调用什么也没写。

Each row below corresponds to a refusal that actually happens (a command result code or a status-line message). Read them as symptom → cause → fix. NoChange is not a failure: it means the target already held the requested value and nothing was written.

现象Symptom 原因Cause 处理Fix
Refused 命令要读活面板的会话(Load、Preview.*、ResetDrafts、Clear、Loco.SetDraft/AddItem/RemoveItem/ImportBlendSpace/FillBlendSpace、Loco2D.*、Jump.AddItem/RemoveItem),而面板没开;或这次调用要求 dry run 但该命令不支持;或模型源里没有可用的骨骼网格The command needs the live panel's session (Load, Preview.*, ResetDrafts, Clear, Loco.SetDraft/AddItem/RemoveItem/ImportBlendSpace/FillBlendSpace, Loco2D.*, Jump.AddItem/RemoveItem) and the panel is closed; or this call asked for a dry run the command does not support; or the model source has no usable skeletal mesh 打开面板;对支持 assetPath 的命令改走资产目标;需要计划就换成支持 dry run 的命令Open the panel; use the asset target on commands that accept assetPath; for a plan switch to a command that supports dry run
IndexRange 集合、选项或键的下标超出当前列表;消息会报出列表的实际长度A set, option or key index is outside the current list; the message reports the real length 先用 List / GetDraft 读一遍再按存在下标写;删掉一个选项后后面的下标会前移Read with List / GetDraft first and use an existing index; removing an option shifts the later indices down
NoAsset assetPath 没给或加载不出 ATT;资产目标上 set 指的那套集合在资产里不存在;骨骼蒙版没有源骨骼网格可查assetPath is missing or does not load as an ATT; the set an asset write names does not exist on the asset; a bone mask has no source skeletal mesh to resolve against 先 Save 把集合写到资产上;给资产指定一个带骨骼网格的模型源Save the set onto the asset first; give the asset a model source with a skeletal mesh
ClipNotInAtt 在资产目标上把某个移动片段种类或跳跃相位指向一条不属于本 ATT 片段行的片段——烘焙只经那些行寻址,解不了它On an asset target, a locomotion clip kind or a jump phase was pointed at a clip that is not one of this ATT's clip rows — the bake addresses clips only through those rows and cannot resolve it 先把片段放进某个集合(Fill Anim、片段数组或 Save 会索引该选项引用的片段),再回来指向它;或者先写 target=draft,由面板 Save 承担建行Put the clip into a set first (Fill Anim, a clip array, or a Save that indexes the option's clip), then point at it; or write target=draft first and let the panel's Save create the row
BadKeyArm 一个键同时带了非零速度与非零转身速率;十字的两条臂各只读自己那一侧One key carries both a non-zero speed and a non-zero turn rate; each arm of the cross reads only its own side 拆成两个键:速度键带速度、转身键带转身速率Split it into two keys: one speed key with the speed, one turn key with the turn rate
DuplicateSpeed · DuplicateTurnRate 两个速度键共用一个速度,或两个转身键共用一个速率;消息点名已占用它的下标Two speed keys share a speed, or two turn keys share a rate; the message names the index already holding it 改掉其中一个锚点;曲线不需要为每个速度各放一个点Change one of the anchors; the curve does not need a point at every speed
CapReached 一条曲线到了 64 个键,或 2D 空间到了 64 条采样One curve reached 64 keys, or a 2D space reached 64 samples 先删掉多余的键或采样;曲线不需要为每个速度各放一个点Remove the extra keys or samples first; the curve does not need a point at every speed
NotEmpty · NotAscending SeedThreeBand 要求键表为空,且三个速度非负并严格递增SeedThreeBand requires an empty key list and three non-negative, strictly ascending speeds 先 ClearKeys;速度按 idle < walk < run 传Call ClearKeys first; pass idle < walk < run
BadArgs 字段类型/取值不对:target 拼错、depth 不在 0..4、bone 为空、phase 不认识、2D 采样位置重复、playRate 超出 [-10, 10] 等A field's type or value is wrong: a misspelled target, a depth outside 0..4, an empty bone, an unknown phase, duplicate 2D sample positions, a playRate outside [-10, 10], and so on 按消息点名的字段改;消息总会写出它接受的取值Fix the field the message names; the message always states what it accepts
BoneNotFound 给的骨骼不是源网格的原始参考骨骼——socket 与虚拟骨骼不在名单里The bone is not a raw reference bone of the source mesh — sockets and virtual bones are not in that list 从面板的骨骼菜单里挑,或照骨架里的原始骨骼名传Pick it from the panel's bone menu, or pass the raw bone name the skeleton carries
Animation Limit Exceeded 整份资产的去重片段超过 128 条;面板记日志并弹窗,Save / Apply 直接拒绝写入The asset's distinct clips exceed 128; the panel logs a line and opens the dialog, and Save / Apply refuse to write 删掉不用的片段,或让多个集合/选项复用同一条片段;草稿一直可编辑Delete unused clips or reuse one clip across sets/options; the draft stays editable throughout
选择器报"匹配不到组合"或 #N 越界A selector reports "matches no combination" or #N out of range 裸名字区分大小写,与模板里的写法必须一致;也可能只命中了被禁用的卡,而禁用卡不占烘焙行。#N 同理只数已启用的卡A bare name is case-sensitive and must match the template's spelling; or the rule only hits a disabled card, and a disabled card occupies no bake row. #N likewise counts only enabled cards 照模板里的名字改;或启用那张卡;#N 按实际的烘焙行数改Match the template's spelling, or enable that card; use an index inside the real bake row count
集合表被整次拒绝The whole set table is refused 重名(不区分大小写)、空名字/空选择器、一个桶被两个集合声明、某个组合没有集合服务、attack 桶为空,或某个集合供给不了任何桶A duplicate name (case-insensitive), an empty name/selector, one bucket declared by two sets, a combination no set serves, an empty attack bucket, or a set that supplies no bucket 按校验返回的 errors 逐条改;面板不会只写一半,改完重跑一次Fix the returned errors one by one; the panel never writes half a table, so re-run once they are fixed
播放按钮灰着或预览被拒绝The play button is disabled or the preview is refused 既没有已绑定 ATT 也没有移动草稿;没有模型源;跳跃一个片段都没填;模板源下 Assembly 面板没开或绑的不是同一份模板No bound ATT and no locomotion draft; no model source; no jump clip at all; or, with a template source, the Assembly panel is closed or bound to a different template 绑一份 ATT 或起草移动键;选一个模型源;先填跳跃相位;打开 Assembly 面板并绑同一份模板Bind an ATT or draft locomotion keys; pick a model source; fill a jump phase first; open the Assembly panel on the same template
骨骼蒙版行点不动The bone-mask rows do not respond 模型源是模板或空着;蒙版要从源网格的原始参考骨架里列骨骼The model source is a template or empty; the masks list bones from the source mesh's raw reference skeleton 先给它一个骨骼网格模型源;状态行会提示同一句话Assign a skeletal mesh model source first; the status line says the same thing

序列帧单位:Sprite Prep Sprite Prep: Frames In, Atlas Out

单位的画面就是一串平面序列帧(2D、像素风、卡牌式单位)时,从 Sprite Prep 开始。这个面板把一帧帧的贴图收进一份 ATA,定好格子、栅格与播放参数,Save 写盘;真正的图集贴图由 Agent Creator 的 Generate 合成后回写。打开方式:MassBattle Agent Creator 入口行上的 Sprite Prep。

When a unit is a flat, frame-by-frame animation on screen — 2D, pixel art, card-style troops — start in Sprite Prep. The panel collects individual frame textures into one ATA, fixes the cell size, grid and playback settings, and Save writes it to disk; the atlas texture itself is composited later by Agent Creator's Generate and written back. Open it from Sprite Prep on the MassBattle Agent Creator entry row.

ATA 是什么 What an ATA Holds

ATA 是 sprite 族的预填资产(Anim-to-Atlas)。它同时记录输入与产物,所以不依赖贴图文件里会被重导出冲掉的元数据:输入是八条固定动画桶里的有序帧、格子、栅格与纹理参数,以及渲染设置;产物是 Generate 回写的图集贴图、栅格尺寸与逐桶帧区间。

An ATA is the sprite family's prep asset (Anim-to-Atlas). It records both the input and the result, so nothing depends on texture metadata that a re-export would wipe: the input is the ordered frames in eight fixed animation buckets plus the cell, grid, texture and render settings; the result is the atlas texture, its grid dimensions and the per-bucket frame ranges that Generate writes back.

八个桶固定为 Idle / Move / Fall / Appear / Attack / Hit / Death / Other,每桶最多八个变体,每个变体就是一条有序的帧片段。桶的位置就是运行时的动画桶,变体的下标就是槽号——面板里填不出运行时读不回来的轨道。桶条右边的 3 / 8 是“已用变体 / 运行时槽位”。

The eight buckets are fixed: Idle / Move / Fall / Appear / Attack / Hit / Death / Other. Each holds up to eight variants, and one variant is one ordered frame clip. A bucket's position is its runtime bucket and a variant's index is its slot, so the panel cannot author a track the runtime could never read back. The 3 / 8 on a bucket bar reads "variants used / runtime slots".

从新建到出图 From New to a Baked Atlas

步骤Step 怎么做What you do
1. 新建1. New New 打开创建菜单,填资产名与输出路径。同名资产不会被覆盖,只会改绑。有 Sprite Versions 列表时,New 建的是选中那个版本自己的 ATA,名字为 ATA_<Unit>_<Part>_<Version>。New opens the create menu for an asset name and output path. An existing name is rebound to, never overwritten. With a Sprite Versions list present, New creates the ATA of the selected version, named ATA_<Unit>_<Part>_<Version>.
2. 收帧2. Collect frames 在某个桶下按 + Add Variant 建一个变体,然后把内容浏览器里的序列帧纹理拖到该变体上。多选按名称自然排序,所以 Frame2 排在 Frame10 之前;也可以直接把纹理拖到窗口任意处,帧会追加进面板最后触碰的变体。Press + Add Variant under a bucket, then drop sequence-frame textures from the Content Browser onto that variant. A multi-select is sorted naturally by name, so Frame2 comes before Frame10; dropping anywhere in the window appends to the variant the panel last touched.
3. 整理3. Tidy the clip 变体标题行有 Sort(按资产名重排)、Clear(清空该变体的帧)与红 ×(删掉整个变体)。每一格帧右上角的 × 删单帧,右下角的定位按钮在内容浏览器里找到这张贴图;双击帧格直接打开它。第一格是按 ATA 帧率播放的动画预览。A variant's header carries Sort (re-order by asset name), Clear (drop every frame of that variant) and a red × (delete the variant). Each frame tile has an × for that one frame and a find-in-Content-Browser glyph at its corner; double-clicking a tile opens the texture. The first cell is an animated preview playing at the ATA's own frame rate.
4. 标记通知4. Mark notifies 在片段下方的 Notifies 行按 + Notify,给这一帧片段加一条具名通知;行里的 Frame 与 Name 可直接改。详见下一节。Under the clip's frame strip, press + Notify to add a named notify row to that clip; edit its Frame and Name in place. The next section covers the rules.
5. 保存5. Save Save 把八个桶拍平成轨道、按 Cell / Grid / Texture 参数求解布局(这一步就是 Resolve),写入每条轨道的起始帧与逐桶帧区间,然后写盘。它同时清掉 ATA 上旧的图集引用——源改过了,图就必须重新 Generate。按钮文字变橙黄并带黄星表示有未保存修改,绿色表示面板与磁盘一致。没绑定 ATA 时,Save 先弹同一个创建菜单。Save flattens the eight buckets into tracks, solves the layout from the Cell / Grid / Texture parameters (this step is the Resolve), writes each track's start frame and the per-bucket ranges, and saves. It also clears the ATA's old atlas reference — the source changed, so the sheet has to be generated again. Amber text with a star means unsaved changes; green means the panel and the file agree. With no ATA bound, Save opens the same create menu first.
6. 交给 Creator6. Hand over Apply 先像 Save 一样写盘,再把这份 ATA 交给已打开的 Agent Creator(作为单位的 Sprite Asset)。Clear 只清空面板并解绑,磁盘上的 ATA 不动。Apply saves exactly as Save does, then hands the ATA to the open Agent Creator as the unit's Sprite Asset. Clear only empties the panel and drops the link; the ATA on disk is untouched.
7. Generate 出图7. Generate the sheet 回到 Agent Creator 按 Generate,图集贴图才会按同一份布局合成并写回 ATA。Save 本身不出像素。Back in Agent Creator, Generate composites the atlas using that same layout and writes it into the ATA. Save alone produces no pixels.

逐帧通知怎么标 Marking a Notify on a Frame

通知挂在某个变体的整条片段上,不是挂在整张图上。帧条带下方出现 Notifies 区块(片段没有任何帧时整块隐藏):按 + Notify 追加一行,默认落在第 0 帧、名字为 Hit,再把它挪到要触发的帧。

A notify belongs to one variant's whole clip, not to the sheet. The Notifies block sits under the frame strip (it disappears when the clip has no frames): press + Notify to append a row, placed at frame 0 with the name Hit, then move it to the frame that should fire.

控件Control 规则Rule
Frame 片段内的帧下标,数值框只接受 0 到最后一帧。落在片段之外的帧不算合法行。The frame index inside the clip; the spinner only accepts 0 through the last frame. A frame outside the clip is not a legal row.
Name 通知的名字,通知表按名字匹配。空名字会被拒绝:文本框放回原名,模型不动,日志写一行说明。首尾空白在写入前被去掉。The notify name, matched by name in the notify table. An empty name is refused: the box restores the previous name, the model is untouched, and the log gets one line. Surrounding whitespace is trimmed before writing.
行尾 ×Row × 删掉这一条通知;片段的帧不受影响。Removes that notify row; the clip's frames are untouched.
+ Notify 每个片段的通知行数有上限,到上限后按钮变灰。片段没有帧时不能加行——没有帧可以承载它。Each clip has a cap on notify rows; the button greys out at the cap. A clip with no frames cannot take a row — there is no frame to hold it.

通知行随轨道一起写进 ATA,Save(或 Apply)会重新校验整份轨道:帧越界、名字为空、或行数超限,都会让布局被拒,并点名是哪一行。烘焙侧对每个片段用的是同一套上限与同一套帧/名字判定,所以面板里合法的行在烘焙时不会突然变得不合法。

Notify rows are written into the ATA with their track, and Save (or Apply) re-validates the whole track: a frame outside the clip, an empty name, or too many rows makes the layout refuse and names the offending row. The bake applies the same cap and the same frame/name test per clip, so a row that is legal in the panel does not become illegal at bake time.

版本作用域:一个 sprite 版本一张图 One Sheet per Sprite Version

一个 sprite 版本就是“一个四边形加上它整份帧集”,所以每个版本各烘一张图集、各有自己的 ATA。Sprite Versions 列表因此每个 sprite 版本一行,行上写着部件名、版本名、ATA 名、已填轨道数与图集尺寸;点一行就编辑那一行的 ATA。

A sprite version is a quad plus its whole frame set, so each version bakes its own atlas and owns its own ATA. Sprite Versions therefore lists one row per sprite version, showing the part name, version name, ATA name, filled-track count and atlas size; click a row to edit that row's ATA.

两种正常状态:行上写 no ATA — New creates one 表示这个版本还没有自己的图,New 就在这一行上创建;几行指向同一份 ATA 时会标 shared x2 一类——共用是允许的,但改任何一行就是改它们全部。列表为空并显示 no sprite version — unit ATA 时,面板编辑的是单位级的那份 ATA,用于没有链接装配模板、或只有一个 sprite 版本且还没有逐版 ATA 的单位。

Two normal states: a row reading no ATA — New creates one has no sheet of its own yet, and New creates it on that row; when several rows point at one ATA the row says shared x2 and similar — sharing is allowed, but editing either row edits both. When the list is empty and reads no sprite version — unit ATA, the panel is editing the unit-level ATA, which covers units with no linked assembly template, or with a single sprite version that has no per-version ATA yet.

布局与尺寸的边界 Layout and Size Limits

帧会被缩放进格子,不会被拒绝。每一帧等比缩放到刚好放进自己的格子:更小的帧放大,更大的帧缩小,绝不裁切、绝不拉伸,剩余部分保持透明。格子本身由自动规则(全部帧的最大尺寸)或手填宽高决定,再受两道上限约束:图集宽高的硬上限,以及整张图集的纹素预算。

Frames are fitted into their cell, never refused. Each frame is scaled with its aspect preserved to fit inside its cell: smaller frames scale up, larger frames scale down, nothing is clipped or stretched, and leftover cell area stays transparent. The cell comes from the automatic rule (the largest frame) or from manual width/height, then is held down by two ceilings: the hard atlas width/height cap and the whole-sheet texel budget.

只有三种情形会被拒绝,而且都会点名:没有任何帧;栅格即使把格子压到 1 像素仍超过尺寸上限;栅格的每格连 1×1 都装不进纹素预算。改列数、改格子或删掉部分变体后再 Save。打开 2 的幂对齐时,格子与列/行会向上取到 2 的幂,图集宽高因此也是 2 的幂。

Only three cases are refused, and each is named: no frames at all; a grid that still exceeds the size cap with a 1-pixel cell; a grid whose cells do not fit the texel budget even at 1×1. Change the column count, the cell, or drop some variants, then Save again. With power-of-two snapping on, the cell and the column/row counts round up to powers of two, so the atlas dimensions do too.

面板动作与命令 id Panel Actions and Command Ids

每个按钮与命令调用同一份模型实现,落盘的资产结果一致(面板额外记撤销步、刷新自己的视图)。命令怎么调用(MCP、控制台、脚本)见 命令怎么调用How to call a command。

Every button and its command call the same model body, so the asset result on disk is the same (the panel additionally records an undo step and refreshes its own views). For how to invoke a command (MCP, console, scripts), see how to invoke commands.

面板上的动作Panel action 命令 idCommand id 差别与要求Differences and requirements
NewNew SpritePrep.New 参数 atlasName(默认 SpriteAtlas)与 outputPath(默认 /Game)。新建的 ATA 当场落盘,因此不支持 dry run;同名只改绑,不覆盖。Takes atlasName (default SpriteAtlas) and outputPath (default /Game). A new ATA has to reach the disk, so dry run is refused; an existing name is rebound to, never overwritten.
LoadLoad SpritePrep.Load 重新读取面板所绑定的 ATA,整份替换轨道、帧与布局参数。它不接收 assetPath,要求面板开着;这不是资产变换,不写盘。Re-reads the ATA the panel is bound to, replacing tracks, frames and layout wholesale. It takes no assetPath and needs the panel open; it is not an asset transform and writes nothing.
SaveSave SpritePrep.Save 省略 assetPath 时作用于活面板,给了就独立处理那份 ATA、不需要面板。dry run 只报会写多少条轨道、多少帧、是否要新建资产。With assetPath omitted it works on the live panel; with a path it works on that ATA without one. A dry run reports how many tracks and frames would be written and whether an asset would be created.
ApplyApply SpritePrep.Apply 先存盘,再把 ATA 写进已打开的 Agent Creator 的 Sprite Asset 槽位。Creator 没开就直接拒绝,不会替你开窗。Saves first, then writes the ATA into the Sprite Asset slot of the open Agent Creator. With no Creator open it refuses instead of opening a window for you.
+ Notify / 改帧 / 改名 / 删行+ Notify / edit / delete rows SpritePrep.SetNotify 参数 assetPath、bucket 与 slot(0-7)、action(add / remove / clear);add 必给 frame 与非空 name,remove 的 frame / name 可省略表示任意。dry run 返回改动后的整份行。重复添加同一行是成功且不写盘。Takes assetPath, bucket and slot (0-7), and action (add / remove / clear). add requires frame and a non-empty name; for remove both filters may be omitted to mean "any". A dry run returns the resulting rows. Re-adding an existing row succeeds without writing.
(无按钮)解析布局(no button) resolve layout SpritePrep.Resolve 给 assetPath,从资产自己的轨道重算布局、应用并存盘,回报列数、行数、总帧数与逐格贴合结果。用于轨道由外部(脚本、JSON 导入)写入、面板没参与的单位。dry run 被拒。Given assetPath, recomputes the layout from the asset's own tracks, applies it, saves, and reports columns, rows, total frames and the per-cell fit. Use it when tracks were written from outside the panel (a script, a JSON import). Dry run is refused.
(无按钮)读通知(no button) list notifies SpritePrep.ListNotifies 只读列出 ATA 每条轨道的通知行,可按 bucket / slot 收窄。Read-only listing of every track's notify rows, optionally narrowed by bucket / slot.
ClearClear — 只存在于面板:清空当前编辑内容并解绑,磁盘不动。没有对应命令。Panel-only: empties what is being edited and drops the link; the disk is untouched. There is no command for it.

Save 之后:图集从哪来 After Save: Where the Atlas Comes From

Sprite Prep 的 Save 只写源:轨道、每轨起始帧、布局参数、以及由布局推导出的逐桶帧区间,同时清掉 ATA 上旧的图集引用。ATA 的 Atlas 分类这时是空的。Agent Creator 按 Generate 之后,工具用同一份布局把每一帧合成进图集,写入图集贴图、列数与行数,并重建逐桶区间。

Sprite Prep's Save writes the source only: tracks, each track's start frame, the layout parameters, and the per-bucket ranges derived from the layout — and it clears the ATA's old atlas reference. The ATA's Atlas section is empty at that point. After Generate in Agent Creator, the same layout is used to composite every frame into one sheet, and the atlas texture, column count and row count are written back while the per-bucket ranges are rebuilt.

同一个 Generate 还会给这个 sprite 版本生成它的 sprite 材质实例。父材质优先取 ATA Render 分类里的 MasterMaterial;没填时退回 Editor Preferences 里 Sprite 那组的母材质。四边形取 QuadMesh,播放速度取 PlaybackFPS。

The same Generate also creates the sprite material instance for that version. Its parent is the MasterMaterial on the ATA's Render section when one is set, and otherwise the master from the Sprite group in Editor Preferences. The quad comes from QuadMesh and the playback rate from PlaybackFPS.

Generate 完成后,Sprite Versions 行上的图集一栏会从 no atlas yet 变成实际尺寸(例如 2048x2048),或者 8x8 grid, no atlas(布局已解、图还没烘)。改了帧或布局就再走一遍 Save → Generate:图集是原位重写,引用不断。

After Generate, the atlas cell on a Sprite Versions row changes from no atlas yet to real dimensions (for example 2048x2048), or to 8x8 grid, no atlas when the layout is solved but the sheet has not been baked. After changing frames or layout, run Save → Generate again: the sheet is rewritten in place and references hold.

一条 sprite 轨道最终怎么在游戏里画出来、档位怎么切换,见 Authoring & Baking;它已经讲清了 Standard 与 Advanced 的分工,这里不重复。

How one sprite track is drawn in game and how render bands switch belongs to Authoring & Baking, which already explains the Standard / Advanced split; it is not repeated here.

多部件换装:Unit Assembly Unit Assembly: Parts, Versions, Style Types

要做出“同一兵种、许多种搭配”,在 Unit Assembly 页签里搭装配模板,再用 Agent Creator 的 Advanced 烘焙。打开方式:Agent Creator 入口行的 Assembly,或 Window → Tools。部件、版本、组合(面板上叫 Style Types)的概念与烘焙边界(同骨架、两层父子、组与版本数)已经写在 Authoring & Baking,本节只讲在这个面板里按什么顺序做什么。

To get "one troop type, many outfits", build an assembly template in the Unit Assembly tab, then bake it with Advanced in Agent Creator. Open it from Assembly on the Agent Creator entry row, or from Window → Tools. The concepts of parts, versions and combinations (called Style Types in the panel), and the bake's boundaries (one skeleton, two levels of parenting, groups versus version counts) live in Authoring & Baking; this section only covers what to do in this panel, in what order.

面板的四个区 The Panel's Four Areas

标题栏下面是动作行、Agent Template、Body Parts、Style Types,底部是 Log。窗口一打开就会在关卡视口里摆出一个预览 Actor,你改什么它立刻显示什么;Focus 把视口相机对到它身上。

Below the title bar come the action row, Agent Template, Body Parts and Style Types, with the Log dock at the bottom. Opening the window stages a preview actor in the level viewport that follows every edit; Focus moves the viewport camera onto it.

动作行按钮Action row button 做什么What it does
New 按 Agent Template 里的资产名与输出路径新建一份空装配模板蓝图并绑定;当前配置先清零。重名自动加 _1 / _2,既有资产不动。Creates and binds a fresh empty assembly template Blueprint at the name and path in Agent Template; the current setup is reset first. A taken name gets _1 / _2, and existing assets are never touched.
Load 把 Agent Template 里选中的资产载入面板,整份替换当前配置。Loads the asset picked in Agent Template into the panel, replacing the current setup.
Save 把当前部件、版本、风格类型写进模板蓝图的默认值并存盘;橙黄文字加黄星表示有未保存修改,绿色表示 UI、资产与磁盘一致。没绑定模板时先弹与 New 相同的创建对话框。Writes the current parts, versions and style types into the template Blueprint's defaults and saves it; amber text with a star means unsaved changes, green means the UI, the asset and the file agree. With no template bound it opens the same create dialog as New first.
Apply 把模板交给 Mesh Prep,不是烘焙:清空 Mesh Prep 的骨骼网格(两者互斥),把模板填进去并带出资产名、路径与动画。要交出模型源,还要在 Mesh Prep 里自己按 Apply。Hands the template to Mesh Prep, not to the bake: it clears Mesh Prep's skeletal mesh (the two are mutually exclusive), fills in the template, and carries over asset names, paths and clips. Handing the model source over still needs Apply inside Mesh Prep.
Clear 解绑模板并清空资产名 / 输出路径 / 骨架覆写;部件与风格类型保留。可撤销。Unbinds the template and clears the asset name, output path and skeleton override; parts and style types survive. Undoable.

搭一个模板:按这个顺序 Building a Template, in Order

Agent Template 是模板的落点:模板类(蓝图)、资产名、输出路径、骨架覆写。先在 New 里定下文件,再往下加部件;Save 才把内容写进这个文件。

Agent Template is where the template lands: the template class (a Blueprint), asset name, output path and skeleton override. Fix the file with New first, then add parts below; Save writes the content into that file.

Body Parts 是部件的卡片列表。按 + Add Body Part 加一个部件;把网格拖到这个虚线槽上则每个网格各成一个部件。卡片标题条上有部件名、类型徽章(Body / Attachment)、拖拽把手、关系芯片(写明挂在哪个父件的哪个 socket)、子件数徽章、⋯ 与删除 ×;双击标题条折叠/展开,Shift+双击让全部部件跟随。

Body Parts is the stack of part cards. Press + Add Body Part to add one part; dropping meshes on that dashed slot makes one part per mesh. A card's header carries the part name, a type badge (Body / Attachment), a drag grip, a relation chip naming the parent part and socket it hangs from, a children badge, ⋯ and a delete ×; double-click the header to fold it, and Shift+double-click to fold or unfold every part.

每个部件卡里有两个追加槽:+ Add Mesh 与 + Add Sprite。+ Add Mesh 追加一个骨骼或静态几何版本;把网格拖上去则全部按拖入顺序成为该部件的版本。每张版本卡有眼睛(显示/隐藏)、缩略图或序列帧、名字框、资产选择器与删除 ×;双击版本行也能切换显隐,缩略图上的绿环标出该部件此刻显示的版本。+ Add Sprite 追加一个 sprite 版本,卡上换成源 ATA、轨道与 Layer;它会预填本单位的 Sprite Asset 与该 ATA 的第一条已填轨道。

Each part card has two append slots: + Add Mesh and + Add Sprite. + Add Mesh appends a skeletal or static geometry version; dropping meshes there makes them all versions of that part, in drop order. A version card has an eye (shown/hidden), a thumbnail or sequence frame, a name box, an asset picker and a delete ×; double-clicking a row also toggles visibility, and the green ring on the thumbnail marks the version that part currently shows. + Add Sprite appends a sprite version, whose card carries the source ATA, a track and a Layer; it pre-fills the unit's Sprite Asset and that ATA's first filled track.

挂接:把子件色块上的连接口拖到另一个部件的色块上,松手即建立父子关系并弹出 socket 菜单;部件卡尾部的关系芯片可点回父件。⋯ 菜单里能改 Type(Body / Attachment)、Parent 与 Socket。层级只允许 Body 加一层子件,面板会拒绝第三层与成环。

Mounting: drag the port on a child's colour block onto another part's block; releasing makes that part a child and opens the socket menu, and the relation chip at the card's tail jumps back to the parent. The ⋯ menu changes Type (Body / Attachment), Parent and Socket. Only a Body plus one level of children is allowed; the panel refuses a third level and any loop.

Style Types 是“每个部件各显示哪个版本”的具名选择:固定卡存一份具体选择,随机卡存每个部件的允许集。控制行四个按钮:Compose(手动输入逐部件下标,-1 或空 = 隐藏)、Capture(把当前显隐状态录成一张卡)、Roll Dice(从选中部件的全部可能里掷出一张新的具体卡;没选中任何部件时对全部部件掷,作用域外部件在卡里隐藏)、Clear(清空全部卡与草稿条,可撤销)。

Style Types are named choices of "which version each part shows": a fixed card stores one concrete pick, a random card stores an allowed set per part. The control row has four buttons: Compose (type per-part indices by hand; -1 or empty hides a part), Capture (record the current shown/hidden state as a card), Roll Dice (draw a new concrete card from every possibility of the selected parts; with nothing selected every part is in scope, and out-of-scope parts are hidden in the card), and Clear (remove every card and open draft, undoable).

一张卡上的操作:双击名字就地改名;勾选框决定它是否参与烘焙;固定卡的眼睛是应用入口——点一下就把这张卡的逐部件选择推到预览,它成为唯一“正在显示”的卡,再点一下停止显示但预览不变;固定卡还有复写按钮,把当前状态覆盖回这张卡;× 删除该卡。Idx: a,b 是这张卡当前组合对应的运行时(行, 变体码),每次绘制现算,不会与卡漂开。随机卡的 Set 行按部件写允许集,例如 any;0,2;none,用分号分隔部件;这种卡的眼睛是骰子,每次点击掷一个新样本。

On a card: double-click the name to rename in place; the checkbox decides whether it takes part in the bake; a fixed card's eye is the apply entry — one click pushes that card's per-part picks onto the preview and makes it the only shown card, and a second click stops showing it while the preview stays; a fixed card also has an overwrite button that records the current state onto it; × deletes the card. Idx: a,b is the runtime (row, variant code) the card currently encodes, computed per paint, so it cannot drift from the card. A random card's Set row holds allowed sets per part, for example any;0,2;none separated by semicolons; its eye is a dice, and every click rolls a new sample.

打组:几个部件同穿同脱 Bake Groups: Parts That Change Together

在部件列表里用 Ctrl+点选或框选几件,右键选择 Group Selected Parts 并成一组。烘焙时一组只产出一个 emitter:组内每个在组合里出现过的版本元组合并成一份网格、占一个 renderer。合并只合几何——材质槽串接、不合并,每个源槽位仍保留自己的材质。组徽章可双击改名;右键菜单还能 Join Group / Remove from Group / Rename Group。

Ctrl+click or marquee-select several parts in the list, then right-click and choose Group Selected Parts to join them. At bake a group produces one emitter: every version-tuple that appears in a combination is merged into one mesh occupying one renderer. Only geometry is merged — material slots are concatenated, never merged, so every source section keeps its own material. Double-click a group badge to rename it; the context menu also offers Join Group / Remove from Group / Rename Group.

看预览 Reading the Preview

控件Control 做什么What it does
Focus 把活动关卡视口的相机移到拼合预览 Actor 上;面板持键盘焦点时按 F 同样。预览跑到视野外时,Body Parts 标题旁会提示它。Moves the active level viewport camera onto the assembled preview actor; F does the same while the panel has keyboard focus. When the preview is out of view, a hint appears beside the Body Parts title.
Anim Preview 选一条与某个 Body 部件骨架匹配的 AnimSequence,在预览 Actor 上播放;旁边是暂停/继续与复位(回到绑定姿势)。Pick an AnimSequence matching a Body part's skeleton and play it on the preview actor; beside it are pause/resume and reset (back to the bind pose).
部件卡与版本卡Part and version cards 点风格卡的眼睛看一种搭配(随机卡上点一次是掷一个样本);单击固定卡里某个部件的版本名,会在光标处弹出该部件的版本列表,选中即改写这张卡里该部件的选择(None = 隐藏)。手动选了某个版本,预览就与激活卡分叉,这属于正常的“已手改”状态;卡片上的 Idx 仍只描述卡里存的选择。Click a style card's eye to view an outfit (on a random card, one click rolls a sample); on a fixed card, click a part's version name to open that part's version list at the cursor and rewrite that pick inside the card (None = hidden). Picking a version by hand moves the preview away from the active card — the normal "modified by hand" state; the card's own Idx readout still describes only what the card stores.

保存与交付 Saving and Handing Over

Save 之后,模板蓝图里每个部件版本都是一个真实组件(骨骼版本是骨骼网格组件,静态版本是静态网格组件),命名固定,打开蓝图就能看到整具单位。要烘焙时,把这份模板填进 Agent Creator 的模型源,Advanced 会一次烘出多部件多版本的系统、渲染器与单位配置;单位配置就是游戏里生成这个兵种时用的那份资产(见 MassBattleAgentConfigDataAsset)。

After Save, every part version exists in the template Blueprint as a real component (a skeletal mesh component for skeletal versions, a static mesh component for static ones) under a fixed name, so opening the Blueprint shows the assembled unit. To bake, put that template into Agent Creator's model source; Advanced produces the multi-part, multi-version system, renderer and unit config in one pass. The unit config is the asset your game spawns that troop type from (see MassBattleAgentConfigDataAsset).

Unit Assembly 的动作与命令 id Unit Assembly: Actions and Command Ids

面板上叫 Style Types,命令与参数里仍用 combination 这个词——两者指的是同一件事:一张具名的逐部件选择卡。调用方式见 命令怎么调用How to call a command。

The panel calls them Style Types, while the commands and their arguments still say combination — both name the same thing: a named card of per-part picks. For invocation, see how to invoke commands.

面板上的动作Panel action 命令 idCommand id 差别与要求Differences and requirements
NewNew Assembly.CreateTemplate 参数 path(内容目录)与 name(蓝图名)。路径上已有模板则原样返回,别的东西则点名拒绝。不支持 dry run。Takes path (content folder) and name (Blueprint name). An existing template at that path comes back unchanged; anything else there is refused by name. No dry run.
LoadLoad Assembly.LoadTemplate 参数 template(蓝图包路径);面板没开时先开页签,绑定后可选地立刻应用一张风格类型(combination)。面板上的 Load 用的是 Agent Template 里已经选好的那份,不写资产。Takes template (Blueprint package path); opens the tab when closed, binds, and optionally applies a style type right away (combination). The panel's Load uses whatever is already picked in Agent Template. Writes no asset.
SaveSave Assembly.WriteConfig 把 Skeleton / Parts / Style Types 从一份 JSON config 写进模板蓝图并存包。面板的 Save 保存的是当前工作副本;命令要把同样的内容作为配置传入。不支持 dry run。Writes Skeleton / Parts / Style Types from a JSON config into the template Blueprint and saves the package. The panel's Save persists its working copy; the command takes the same content as a config. No dry run.
眼睛(固定卡)Eye (fixed card) Assembly.ApplyCombination 把具名风格类型应用到活预览,所有部件一起切换。随机卡按存下的选择应用,不掷点。不写资产。Applies the named style type to the live preview, switching every part at once. A random card applies its stored picks and does not roll. Writes no asset.
眼睛(随机卡 / 骰子)Eye on a random card (dice) Assembly.RollCombination 从随机卡里掷一个样本并应用。seed 省略时由风格类型名推导,所以同一张卡每次调用、跨编辑器会话都掷出同一个样本;固定卡没有可掷的参与集,退回一次普通应用并如实说明。Rolls one sample out of a random card and applies it. With seed omitted the seed is derived from the style type name, so the same card rolls the same sample on every call and across editor sessions; a fixed card has nothing to roll and falls back to a plain apply, saying so.
Style Types 列表The Style Types list Assembly.ListCombinations 按烘焙行序列出:已启用的卡按模板顺序在前,index 就是烘焙配方里的行;禁用卡排在最后、index 为 -1。只读。Lists in bake-row order: enabled cards first in template order, with index equal to the bake recipe row; disabled cards come last with index -1. Read-only.
(无按钮)读预览的风格身份(no button) read the preview's style identity Assembly.GetPreviewStyle 报出预览此刻对应哪一行、哪个行内变体,以及它是原样、被手改、从构成推导、多张卡吻合、显示卡已禁用,还是没有任何已启用卡。纯读,不重建预览。卡片条上的 Idx 只描述卡里存的选择;手改之后两者会分叉,这是正常的。Reports which row and which within-card variant the preview currently encodes, and whether that is exact, hand-modified, derived from the composition, matched by several cards, on a disabled card, or no enabled card at all. Pure read; rebuilds nothing. The card's own Idx describes only what the card stores; after a hand edit the two diverge, which is normal.
(无按钮)显示一个变体(no button) show a variant Assembly.PreviewStyle 参数 index(已启用卡行)、subIndex(行内变体,省略或 -1 = 第一个)、apply(假 = 只解码不显示)。只写面板显示的构成,不改风格类型、不弄脏模板、不落撤销步。Takes index (enabled-card row), subIndex (within-card variant; omitted or -1 means the first) and apply (false = decode only). It writes only the panel's shown composition: no style type is edited, the template is not dirtied, and no undo step is created.
(无按钮)摆放诊断(no button) placement dump Assembly.DescribePreview 按层级顺序列出预览 Actor 的每个组件:名字、类、父级、挂载 socket、网格、世界位移/旋转/缩放、世界包围盒与可见标记。出画、被包住、缩成零、从未挂上,这四种在屏幕上一样模糊,在这里各是一个值。纯读。Lists every component of the preview actor in hierarchy order: name, class, parent, attach socket, mesh, world location/rotation/scale, world bounds and visible flag. Off-frame, buried, scaled to nothing and never attached look alike on screen and are four different values here. Pure read.
(无按钮)修重名(no button) repair duplicate names Assembly.MakeNamesUnique 旧模板里同名风格类型与“名字是键”的规则冲突时用:第一张保留原名,其后的按卡片顺序改成 Name (2)、Name (3)……并保存。名字本已唯一时报无改动、不写盘;dry run 只返回映射。For a legacy template whose duplicate style-type names break the "the name is the key" rule: the first card keeps the name, later ones become Name (2), Name (3)… in card order, then the package is saved. An already-unique template reports no change and writes nothing; a dry run returns the mapping only.
(无按钮)版本体检(no button) version audit Assembly.ValidateVersions 只读审每个版本是否烘焙就绪,回报网格、类型、材质槽数、LOD 数、骨架是否与模板一致;默认按 expectedLods=6、expectedSlots=1 检查。sprite 版本按它自己的 ATA 检查:必须有至少一条已填轨道,并带材质。问题逐条列在结果里。Read-only audit of every version's bake readiness: mesh, kind, material slot count, LOD count and whether the skeleton matches the template; by default it checks expectedLods=6 and expectedSlots=1. A sprite version is checked against its own ATA — at least one filled track and a material. Problems are listed one by one.

Compose / Capture / Roll Dice 没有一一对应的命令。要在面板外生成整套配置,走 Assembly.WriteConfig(写)与 Assembly.ReadConfig(读回,可把回读结果直接喂回写入)。Apply(交给 Mesh Prep)也只在面板里有。

Compose / Capture / Roll Dice have no one-to-one commands. To author a whole setup outside the panel, use Assembly.WriteConfig (write) and Assembly.ReadConfig (read back; its payload can be fed straight back into the writer). Apply (the hand-off to Mesh Prep) is panel-only too.

把材质槽烘成一张图:Merge Mat Slots Merge Mat Slots: One Slot, One Atlas

一个网格上有六七个材质槽,每个槽一张贴图、一份材质——渲染批次和内存都被它拖住。Merge Mat Slots(设置页里叫 Slot Atlas)把每个可烘网格的全部材质槽折成一个槽,槽位属性烘进同一张图集。打开方式:Agent Creator 入口行 → Tool Box → Merge Mat Slots。工具页签的标题就是 Merge Mat Slots。

Six or seven material slots on one mesh — one texture and one material each — hold up both draw calls and memory. Merge Mat Slots (called Slot Atlas on the settings page) folds every material slot of each eligible mesh into one slot and bakes the slot properties into one atlas. Open it from the Agent Creator entry row → Tool Box → Merge Mat Slots; the tool tab's own title is Merge Mat Slots.

它产出什么 What It Produces

产物Output 是什么What it is
<Source>_SlotMerged 源网格旁边的一份副本,只剩一个材质槽,UV 已重写成图集坐标;低 LOD 从烘后的 LOD0 重新生成。默认输入网格不动——这份副本就是回滚方案。A copy beside the source mesh with a single material slot and UVs rewritten into atlas coordinates; lower LODs are regenerated from the baked LOD0. The input mesh is untouched by default — the copy is the rollback.
Tex_<Copy> 目录folder 这张图集的贴图目录。每个烘出真实像素的通道一张贴图;某个通道烘成单一均匀颜色时不建贴图,改由回退常量承载。The atlas texture folder. Every channel that baked real pixels gets one texture; a channel that baked to one uniform colour gets no texture and travels as a fallback constant instead.
<Copy>_SlotAtlasMaster Slot Atlas 设置所指母材质在这张网格上的一份副本,放在该网格自己的 Tex_<Copy> 目录里。图集写进它自己的纹理参数默认值,合并后的网格就指向它——不创建材质实例。用副本而不是随包母材质,是为了让烘好的图集自成一体,插件更新换掉模板也不改变已经烘出的东西。A per-mesh copy of the master named by the Slot Atlas setting, inside that mesh's own Tex_<Copy> folder. The atlas is written into its own texture-parameter defaults, and the merged mesh points at it — no material instance is created. The copy rather than the shipped master keeps a baked atlas self-contained: a plugin update replacing the template cannot change what you already baked.

这份母材质在 Editor Preferences → Plugins → MassBattle → Slot Atlas → Atlas Master Material 里配置,出厂默认值开箱可用。烘焙要复制的系统与渲染器模板在另一组 Bake Templates 里。

That master is configured under Editor Preferences → Plugins → MassBattle → Slot Atlas → Atlas Master Material, and the factory default works out of the box. The system and renderer templates a bake duplicates live in a different group, Bake Templates.

扫描 → 烘焙 → 核对 Scan → Bake → Verify

范围有三种,优先级从高到低:拖到表格上的网格、内容浏览器的实时选区、头部路径框里的目录。按 Use Selection 切到实时选区;拖入会替换它们,直到下一次显式切换。拖入只收骨骼网格;目录与选区也可以带静态网格。

Scope has three sources, highest first: meshes dragged onto the table, the live Content Browser selection, and the folder in the header field. Use Selection switches to the live selection; a drop replaces both until the next explicit switch. A drop accepts skeletal meshes only; the folder and the selection may also bring static meshes.

1. Scan 是只读检查:每个网格的每级 LOD、每个材质槽一行,列为 Mesh / LOD / Slot / Slot Name / Material / Tris / Class。Class 说的是这个槽位带着什么差异:

1. Scan is the read-only pass: one row per mesh, LOD and material slot, with columns Mesh / LOD / Slot / Slot Name / Material / Tris / Class. Class names the difference the slot carries:

ClassClass 含义Meaning
Identical (S1)Identical (S1) 同一个材质对象,没有材质差异要弥合。The same material object; no material difference to bridge.
EmptyEmpty 各级 LOD 都没有多边形。No polygons on this slot in any LOD.
Parameters only (S2)Parameters only (S2) 同母材质、参数值不同。Same master material, different parameter values.
Textures only (S3)Textures only (S3) 同母材质、贴图不同。Same master material, different textures.
Incompatible (S4)Incompatible (S4) 混合模式 / 双面与配对槽不同,或根本没有配对对象;没有阶段能弥合它。Blend mode or two-sided differs from its partner, or there is no partner at all; no stage can bridge it.

表格下方一行摘要写 N meshes, N slots (N mergeable, N incompatible);可合并数的是标绿的两类(Identical 与 Empty)。扫描不写任何东西。

A summary line under the table reads N meshes, N slots (N mergeable, N incompatible); "mergeable" counts the two green classes (Identical and Empty). Scan writes nothing.

2. 配置并 Bake Atlas。烘焙前在这行定三件事:Overwrite source mesh(把结果写回源网格;默认关闭,写副本)、Atlas 边长(默认 1024,可输入 64-8192,旁边 512 / 1024 / 2048 / 4096 一键)、Rescale tiled UVs(把 UV0 越出 [0,1] 的槽按自身范围归一后再烘;会改变平铺观感,默认关闭)。Bake 会先规划整个范围,逐网格显示进度,可取消;已写出的网格留在磁盘上。

2. Configure and press Bake Atlas. Three things are set on that line before baking: Overwrite source mesh (write onto the source instead of a copy; off by default), the Atlas edge (default 1024, typed in the 64-8192 range, with 512 / 1024 / 2048 / 4096 one click away) and Rescale tiled UVs (normalise slots whose UV0 leaves [0,1] before baking; this changes how tiling reads, off by default). Bake plans the whole scope first, shows per-mesh progress and can be cancelled; meshes already written stay on disk.

3. 核对。看日志尾部的汇总:Atlas bake: N mesh(es) written, N texture(s), N slot(s) collapsed,有失败时多一项失败数并逐条说明原因。打开 _SlotMerged 副本,确认它只剩一个材质槽,且它所指的材质就是 <Copy>_SlotAtlasMaster。被跳过的网格会带着原因出现——把 UV 归一、换掉不兼容的材质或从范围里去掉,再 Scan / Bake 一次。

3. Verify. Read the summary at the tail of the log: Atlas bake: N mesh(es) written, N texture(s), N slot(s) collapsed, with a failure count and a reason per mesh when anything failed. Open the _SlotMerged copy and confirm it has one material slot and points at its <Copy>_SlotAtlasMaster. A skipped mesh appears with its reason — rescale its UVs, replace the incompatible material, or take it out of scope, then Scan / Bake again.

重复烘焙会另写一份带编号的副本。面板没有“替换上一次产物”的开关:再烘一次会得到 _1 一代。要原地替换,用命令的 overwriteOutput=true(见下表)——它只删本工具自己的上一次产物,输入网格永不删除。

A second bake writes a numbered copy. The panel has no "replace my previous output" switch, so baking again produces a _1 generation. To replace in place, use the command's overwriteOutput=true (see the table below) — it deletes only this tool's own previous output, never an input mesh.

24 个参数的硬契约 The 24-Parameter Contract

每份 <Copy>_SlotAtlasMaster 都必须声明全部 24 个参数,少一个就在写入任何东西之前被按名拒绝。若你把设置里的母材质换成了自己的,它同样要满足这 24 项:

Every <Copy>_SlotAtlasMaster must declare all 24 parameters; one missing and the mesh is refused by name before anything is written. If you replace the configured master with your own, it must satisfy the same 24:

组Group 参数Parameters
8 张纹理8 textures BaseColorTex · NormalTex · MetallicTex · RoughnessTex · SpecularTex · AOTex · EmissiveTex · OpacityTex
8 个开关8 switches 每个通道一个,MB_Use + 通道名 + Tex:MB_UseBaseColorTex 到 MB_UseOpacityTex。One per channel, MB_Use + channel + Tex: from MB_UseBaseColorTex to MB_UseOpacityTex.
8 个回退常量8 fallbacks 每个通道一个,MB_ + 通道名 + Fallback:MB_BaseColorFallback 到 MB_OpacityFallback。One per channel, MB_ + channel + Fallback: from MB_BaseColorFallback to MB_OpacityFallback.

参数只存在于材质函数里(副本自己的图上没有可写的表达式)、或引擎在该轮结束前仍未编译出这份副本时,同样按名拒绝——合并后的网格会连着这份材质一起存盘,不能指向一份半成品。一个通道烘成均匀颜色时,它对应的 MB_Use…Tex 开关关掉,常量写进对应的 Fallback,所以“八个参数全在”与“八张贴图全建”不是一回事。

A parameter that exists only inside a material function (the copy's graph has no expression to write) is refused by name as well, and so is a copy the engine has still not compiled by the end of the run — the merged mesh is saved against that material, so it cannot point at a half-finished one. When a channel bakes to a uniform colour, its MB_Use…Tex switch is turned off and the constant goes into the matching …Fallback, so "all eight parameters exist" and "all eight textures were created" are not the same thing.

边界 Boundaries

只烘 LOD0。一套图集服务不了 UV 布局不同的几何,所以更低 LOD 全部从烘后的 LOD0 重新生成,原有的低 LOD UV 被有意丢弃。做完之后再改低 LOD 的 UV 没有意义——要改就改源 LOD0 再烘。

LOD0 only. One atlas cannot serve geometry with different UV layouts, so every lower LOD is regenerated from the baked LOD0 and the old lower-LOD UVs are deliberately discarded. Editing lower-LOD UVs afterwards achieves nothing — edit the source LOD0 and bake again.

整张图集只有一个混合模式。源槽位的混合模式必须一致;只接受 Opaque 与 Masked 两种源,别的模式没有对应的属性通道,直接拒绝。各槽不一致的网格同样拒绝。

One blend mode for the whole atlas. The source slots must agree; only Opaque and Masked sources are accepted, and every other mode has no property channel in the atlas table and is refused. A mesh whose slots disagree is refused too.

遮罩网格:面板会拒绝。面板没有遮罩开关,所以 Masked 材质在规划阶段就被拒绝,并点名这个开关。要用命令处理它们:maskedMode=opaque 安全但丢掉镂空;probe 保住镂空且不编译遮罩排列;on 是实验路径,复杂遮罩材质会让引擎的烘焙代理断言并带崩编辑器,不要在生产内容上用。

Masked meshes: the panel refuses them. The panel has no masked switch, so Masked materials are refused at the planning stage and the switch is named. To handle them, use the command: maskedMode=opaque is safe but drops the cutout; probe keeps the cutout without compiling a masked permutation; on is the experimental path, and complex masked materials make the engine's bake proxy assert and take the editor down — do not use it on production content.

UV 越界要么归一,要么被拒。任一被烘槽位的 UV0 越出 [0,1] 时,不打开 Rescale tiled UVs 就拒绝该网格;打开后按该槽自身范围归一化,平铺观感随之改变。源材质在标准属性集之外做的东西(自定义溶解、发光强度、triplanar 开关)不会带过来——工具采样的是属性,不是材质图。

Out-of-range UVs are either rescaled or refused. If any baked slot's UV0 leaves [0,1], the mesh is refused unless Rescale tiled UVs is on; with it on, the slot is normalised by its own bounds and the tiling reads differently. Anything a source material does outside the standard property set (custom dissolve, emissive strength, triplanar switches) is not carried over — the tool samples properties, not graphs.

Merge Mat Slots 的动作与命令 id Merge Mat Slots: Actions and Command Ids

面板只有两个动词,命令也一样。调用方式见 命令怎么调用How to call a command。

The panel has two verbs, and so does the command layer. For invocation, see how to invoke commands.

面板上的动作Panel action 命令 idCommand id 差别与要求Differences and requirements
ScanScan SlotMerge.Scan 范围参数 folder 与 assets(对象路径数组),两者可同时给。只读,返回逐槽行、mergeable 与日志;支持 dry run(反正不写)。Scope arguments folder and assets (an array of object paths); both may be given. Read-only: returns the per-slot rows, mergeable and a log. Dry run is accepted (nothing writes anyway).
Bake AtlasBake Atlas SlotMerge.BakeAtlas 同样的 folder / assets,加 atlasSize(默认 1024)、rescaleUvToTile、overwriteSource、overwriteOutput 与 maskedMode。dry run 返回逐网格的规划(格数、格子尺寸、UV 是否在单位范围、混合模式、是否可烘、拒绝原因),不写盘。The same folder / assets, plus atlasSize (default 1024), rescaleUvToTile, overwriteSource, overwriteOutput and maskedMode. A dry run returns the per-mesh plan (tiles, tile size, UV-in-unit-range, blend mode, eligible, refusal) and writes nothing.
Overwrite source meshOverwrite source mesh SlotMerge.BakeAtlas → overwriteSource=true 结果替换输入网格本身(删除 + 改名);失败时用本轮仍持有的对象把输入恢复回来。The result replaces the input mesh itself (delete + rename); on failure the input is restored from the object the run still holds.
Rescale tiled UVsRescale tiled UVs SlotMerge.BakeAtlas → rescaleUvToTile=true 规划与烘焙必须用同一个值,否则网格会按一种规则判定、按另一种规则烘;命令把同一参数同时交给两者。Planning and baking must use the same value, or a mesh is judged by one rule and baked by another; the command passes the same argument to both.
Atlas 边长与 512/1024/2048/4096Atlas edge and presets SlotMerge.BakeAtlas → atlasSize 任意正整数都能烘,面板只是把输入夹在 64-8192;2 的幂是建议,不是规则。Any positive integer bakes; the panel merely clamps typed input to 64-8192. Powers of two are a recommendation, not a rule.
(无面板控件)替换上一次产物(no panel control) replace previous output SlotMerge.BakeAtlas → overwriteOutput=true 删除本工具自己的上一次网格副本与图集目录,写规范名而不是 _1;删不干净时整轮失败并点名残留物,绝不退回去分叉。输入网格永不删除。Deletes this tool's own previous mesh copy and atlas folder and writes the canonical names instead of _1; if the deletion cannot finish, the run fails and names what survived rather than falling back to a fork. The input mesh is never deleted.
(无面板控件)遮罩模式(no panel control) masked mode SlotMerge.BakeAtlas → maskedMode off / on / opaque / probe。off 是默认也是面板的行为;opaque 安全但丢镂空;probe 保镂空;on 仅实验。off / on / opaque / probe. off is the default and what the panel runs; opaque is safe but drops the cutout; probe keeps the cutout; on is experimental only.

该用哪个面板 Which Panel to Pick

先看资产长什么样,再决定从哪进。下面四条入口各做一件事,不必都走一遍。

Look at the asset first, then pick an entry. The four entries below each do one job; you do not have to run all of them.

你的资产Your asset 用哪个面板Use 为什么Why
单网格、无换装A single mesh, no outfit variation Mesh Prep → Agent Creator GenerateMesh Prep → Agent Creator Generate 一个模型进、一组产物出,不需要部件与版本。这条路径不在本节。One model in, one product family out; parts and versions buy nothing here. That path is outside this section.
一串序列帧 / 2D、像素风单位A sequence of frames / a 2D or pixel-art unit Sprite PrepSprite Prep 帧属于 sprite 版本,每个版本各一份 ATA、各一张图集。单位需要几个可换的 sprite 版本时,先在 Unit Assembly 里加 sprite 版本,再回到这里逐版本收帧。Frames belong to a sprite version, and each version owns its ATA and its atlas. When a unit needs several switchable sprite versions, add them in Unit Assembly first, then collect frames per version here.
多部件、每个部件多个版本、要换装Several parts, several versions each, outfits must vary Unit Assembly → Advanced 烘焙Unit Assembly → Advanced bake 部件是烘焙里的分支,版本是可换的具体模型,风格类型决定出生搭配;打组把同穿同脱的部件压成一个 emitter。A part is a bake branch, a version is a concrete switchable model, and a style type decides the outfit at spawn; groups fold parts that always change together into one emitter.
任何网格的材质槽太多、想要一个槽一张图Any mesh with too many material slots that should become one slot and one atlas Merge Mat SlotsMerge Mat Slots 它不产出单位,只整理几何:把槽位折成一个、属性烘进一张图集,产物是源旁边的一份副本。适合在把网格交给 Mesh Prep 或 Unit Assembly 之前做。It does not make a unit; it cleans geometry: slots fold into one and properties bake into one atlas, as a copy beside the source. Run it before handing meshes to Mesh Prep or Unit Assembly.

Sprite、装配与单网格三条烘焙路径最终都汇到同一处:单位配置、渲染器与系统;Merge Mat Slots 的产物则是一份更轻的网格,交给任意一条路径继续用。它们怎么接进游戏、档位怎么切、烘焙有哪些边界,见 Authoring & Baking、渲染管线Render pipeline 与 功能简介Features。

The sprite, assembly and single-mesh bake paths all end in the same place: a unit config, a renderer and a system. Merge Mat Slots instead produces a lighter mesh that any of those paths can keep using. How they reach the game, how render bands switch, and what the bake will not do are covered in Authoring & Baking, Render Pipeline and Features.

资产维护工具 The Asset-Maintenance Tools

这一组工具是预处理:跑在烘焙之前,目的只有一个——把模型弄规范。几份网格能不能合成一份、一批网格的 LOD 是不是同一个标准、名字是否统一、若干个材质槽能不能收成一张图集、多份网格的材质能不能指回同一个母材质、从旧版本带上来的资产还认不认得出来。

This group is preprocessing: it runs before the bake, and it has one job — make the model normal. Whether several parts can become one mesh, whether a batch of meshes follows one LOD standard, whether names are consistent, whether several material slots can fold into one atlas, whether several meshes can point at one parent material, and whether an asset carried over from an older version is still recognised.

规范完再进烘焙(Mesh Prep →(可换装时)Assembly → Generate),整条流水线只需要跑一遍。它们和烘焙互不替代:烘焙不会替你合并网格,合并也不会替你烘出运行时资产。

Normalise first, then bake (Mesh Prep, Assembly when the unit varies outfit, Generate) — and the pipeline only runs once. The two never substitute for each other: the bake will not merge meshes for you, and merging will not produce runtime assets.

共同形状是「先扫描、再应用」。扫描永远只读:它告诉你哪些资产会被改、哪些会被拒绝、拒绝的原因是什么。应用才写资产。四个工具窗口共用同一条范围条——Scope: 目录框、Use Selection(把范围切到内容浏览器的实时选区)、Recursive(目录范围是否含子目录;不需要递归的工具不显示这一项)、Scan。网格可以直接拖进表格,拖入会顶替目录与选区,成为当前范围。

The shared shape is scan first, apply second. A scan is always read-only: it says which assets would change, which would be refused, and why. Only Apply writes. The four tool windows share one scope bar — Scope: (the folder field), Use Selection (switch the scope to the live Content Browser selection), Recursive (whether a folder scope includes subfolders; a tool that never recurses does not show it) and Scan. Meshes can be dragged straight into the table; a drop replaces the folder and the selection as the current scope.

维护工具的产物是普通资产。合并出的网格、图集、重挂后的材质实例、重存过的 ATT 都照常被引用、照常被烘焙读取。这些工具不会替你重烘,也不会改动已有的烘焙配方——写完之后回到烘焙面板按 Generate,才是让改动进入游戏的那一步。

What these tools produce are ordinary assets. The merged mesh, the atlas, the reparented material instances and the re-saved ATT are referenced and read by the bake exactly like anything else. None of these tools re-bakes for you or edits an existing bake recipe — pressing Generate in the bake panel afterwards is what carries the change into the game.

每条工具在下面各占一节,节末是该工具的命令清单。全部命令 id、参数与返回字段集中在 完整命令表Full command map。

Each tool gets its own section below, ending with that tool's command list. Every command id, argument and returned field is collected in the full command table.

合并网格 Merge Meshes

面板标题是 Merge Meshes。它把一个组里的多份网格合成一份同类型的新网格资产:把若干部件合成一张刚体网格、把组件的几何收成一份、把武器的各段并成一把,都属于它。产物是一份普通网格,烘焙与运行时不会因为它"是合并出来的"而区别对待。

The panel is titled Merge Meshes. It merges the meshes of one group into one new mesh asset of the same kind: collapsing several parts into a rigid mesh, gathering a component's geometry into one asset, or joining a weapon's segments into one. The result is an ordinary mesh — neither the bake nor the runtime treats it differently for having been merged.

什么时候用它 When to reach for it

凡是"这几份网格本该是一体"的地方:一个单位有很多只作为刚体出现的装饰件(永远一起动、不各自变形);同一件装备被切成几段导入;一个组件的几何来自多张网格;或者你想把一份剪枝过的部件重绑到整副骨架上。反过来,会各自动画的部件不要合并——合并只保留一套骨架与一条 LOD 阶梯。

Whenever several meshes should really be one: a unit carries decorations that only ever appear as rigid pieces (they always move together and never deform on their own); one piece of equipment arrived split into segments; a component's geometry came from several meshes; or you want to rebind a pruned part onto the whole rig. Going the other way, parts that animate independently should not be merged — a merge keeps one skeleton and one LOD ladder.

步骤 Steps

# 做什么Do this 你会看到What you get
1 在 Scope: 填目录、按 Use Selection,或把网格拖进表格。整个范围就是一个组。Fill Scope:, press Use Selection, or drag meshes into the table. The whole scope is one group. 表格一行一个源:Source、LODs、Sections per LOD、Slots、Verdict。One row per source: Source, LODs, Sections per LOD, Slots, Verdict.
2 按 Scan。它只读,不写任何资产。Press Scan. It is read-only and writes nothing. Verdict 说这个组能不能合并;不能时写明是哪一条守卫没过(以及是哪一根骨)。Verdict says whether the group can merge; when it cannot, it names the guard that failed — and the bone, for a bone-space failure.
3 要逐网格的证据时,用 SkelMerge.RefSkeletons:骨架资产、参考骨数、档数、逐级 section 数、槽数、变形目标数、最前面几根骨的名字。For per-mesh evidence use SkelMerge.RefSkeletons: skeleton asset, reference bone count, LOD count, sections per level, slots, morph targets, and the first few bone names. 这条探针回答合并日志答不了的问题:两个骨数究竟差在哪,而不用先去试合并。This probe answers what the merge log cannot: where two bone counts actually differ, without attempting the merge first.
4 按需勾选三个开关(见下表),然后按 Apply Merge。Set the three switches (below) as needed, then press Apply Merge. 首个源旁边出现 <首个源名>_MeshMerged;撞名时是 _1、_2……A <first source>_MeshMerged appears beside the first source; on a name collision it becomes _1, _2, …
5 多组一次做完时用命令 SkelMerge.Apply 的 groupBy:single(整个范围一组)、subfolder(按网格所在目录的叶名分组)、prefix(按网格名第一个下划线之前的部分分组)。To do several groups in one run, use SkelMerge.Apply with groupBy: single (the whole scope), subfolder (by the leaf of each mesh's folder) or prefix (the mesh name up to its first underscore). 每组一份产物,命名 <组键>_MeshMerged;outputName 只在 single 下有效。批量应用有进度窗(标题 Skeleton Merge),可取消,取消发生在组与组之间——已合并的组保持已写出。One output per group, named <group key>_MeshMerged; outputName is only valid with single. A batch apply shows a progress window titled Skeleton Merge with a Cancel button; a cancellation lands between groups, so merged groups stay written.

三个开关 The three switches

开关Switch 默认Default 改变什么What it changes
Merge morph targets 开On 按属性指纹把各源同名的变形目标折进合并网格。关掉则产物没有变形目标。Folds the sources' same-named morph targets into the merged mesh by attribute fingerprint. Off means the result carries none.
Full precision UVs 关Off UV 用全浮点存储。开它会让 UV 载荷翻倍,所以默认关。Stores UVs at full float precision. It doubles the UV payload, which is why it is off.
Overwrite source mesh 关Off 把结果写回首个源,那一份源资产会被删除、产物接管它的路径与名字;其余源不动。默认关时源一律不动,副本就是你的回滚。Writes the result over the first source: that source asset is deleted and the merged asset takes its path and name; the other sources are untouched. Off leaves every source alone — the copy is your rollback.

它合并什么、不合并什么 What it merges, and what it does not

会拒绝的情形 What it refuses

情形Case 为什么Why
一组里混有骨骼网格与静态网格One group holding both skeletal and static meshes 一次合并只产出一类资产,没有"混合"这个产物类型。这是第一条守卫,先于任何逐成员检查。A merge has one output type, and there is no "mixed" outcome. This is the first guard, ahead of any per-member test.
某个源没有骨架资产,或某一级 LOD 一个 section 都没有A source with no skeleton asset, or one level with no sections 合并逐级工作;某一级没有 section,合并后那一级就没有几何,而逐成员路径本来会画出来——静默丢几何。A merge works level by level; a level with no sections contributes no geometry, while the per-member path would have drawn it — silent geometry loss.
各源的 LOD 档数不一致Sources disagree on the LOD count 合并按下标对齐各级;档数不同的成员在它自己最后一档以上会什么都贡献不了。逐级 section 数量不同是允许的(减面可能把某个槽在深档剪空),档数必须一致。Levels are aligned by index, so a member with a different count contributes nothing above its own last level. Per-level section counts may differ (reduction can empty a slot at a deep level); the number of levels may not.
某个源的某根骨不在组的骨骼空间里A source bone that is not in the group's bone space 按骨名映射要求每根骨都能在空间里找到位置。不同骨架的部件因此合不到一起,而同一副骨架的剪枝部件可以。The by-name mapping needs a home for every bone. Parts from a different skeleton therefore cannot join, while pruned parts of the same rig can.
静态网格在 LOD0 没有描述体A static mesh with no LOD0 description 静态网格的每一级都从 LOD0 的描述体减出来;缺了它就没有可减的源头。Every static level is reduced from the LOD0 description; without it there is nothing to reduce from.
一个组超过 16 个输入More than sixteen inputs in one group 规模守卫:合并代价随组规模增长,而"一次目录扫描落进同一个组"多半是笔误。整组被拒绝,除非显式 allowLargeGroup=true。A size guard: merge cost grows with the group, and a folder scan landing in one group is usually a slip. The group is refused unless you pass allowLargeGroup=true.
目录范围里只有本工具上一次的产物A folder scope that resolves to nothing but this tool's own previous output 名字里带 _Merged 或 _MeshMerged 的资产默认被跳过,避免批量吃掉自己的产物。真要拿它们当输入就传 includeMerged=true;显式点名的资产一律保留。Assets whose names carry _Merged or _MeshMerged are skipped by default so a batch cannot eat its own output. Pass includeMerged=true to use them as input; an explicitly named asset is always kept.

这里能合的组,烘焙的预合并未必接受。烘焙侧的组预合并仍要求各成员的参考骨架完全相同;本工具允许剪枝部件(子集骨架)参与。所以一个"剪枝部件 + 完整骨架部件"的组在这里能合,在烘焙里仍会被拒。想让这个组走烘焙的预合并,就别把剪枝部件与其它网格凑成一组,或先用 fullRig 把剪枝部件重绑。

A group that merges here is not automatically accepted by the bake's pre-merge. The bake-side group pre-merge still demands that every member share the same reference skeleton, while this tool allows pruned parts (subset skeletons). A "pruned part plus full-skeleton part" group therefore merges here and is still refused at bake time. To let a group take the bake's pre-merge path, do not pair pruned parts with other meshes — or rebind them first with fullRig.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
SkelMerge.Scan 应用之前先看结论:逐源行、组结论、骨骼空间的骨数、第一条拒绝原因。Before applying: per-source rows, the group's verdict, the bone space's bone count, the first refusal. 不写。Nothing.
SkelMerge.RefSkeletons 只想要逐网格的骨架事实,不想试合并。When you want per-mesh skeleton facts without attempting a merge. 不写。加载不了的路径是一行答案,不是命令失败。Nothing. A path that will not load is one answer among the rows, not a command failure.
SkelMerge.Apply 真正合并;dryRun=true 时它的载荷就是扫描的载荷,外加一个"没写资产"的标志。The real merge; with dryRun=true the payload is the scan's plus a flag saying nothing was written. 每组一份新网格(或按 overwriteSource 写回首个源)。One new mesh per group (or the first source, under overwriteSource).

LOD 标准化 LOD Standardization

面板标题是 LOD Standardization。它拿一份 Skeletal Mesh LOD Settings 资产当唯一标准(面板上叫 Profile:),逐个判断列表里的网格是否与它一致,然后把不一致的推到它上面。

The panel is titled LOD Standardization. It takes one Skeletal Mesh LOD Settings asset as the single standard (called Profile: on the panel), judges every mesh in the list against it, then pushes the ones that disagree onto it.

什么时候需要它 When a project needs it

三种情况:① 一批网格的切换阈值、档数或减面百分比是各人各调出来的,同一距离下不同单位切换得不一样;② 你要把若干网格合成一个单位(装配烘焙的组预合并),而合并要求同一骨架的网格档数一致——扫描的组 lint 会直接点名哪个骨架混着档数、哪些组会因此退回逐成员烘焙;③ 你换了模型或改了减面策略,需要整批对齐到一个新的标准上。

Three situations: ① a batch of meshes has hand-tuned thresholds, level counts or reduction percentages, so different units switch at different distances; ② you are merging meshes into one unit (the assembly bake's group pre-merge), which requires meshes of one skeleton to share a level count — the scan's group lint names which skeleton mixes counts and which groups would therefore fall back to per-member baking; ③ you changed a model or a reduction policy and need a whole batch aligned to a new standard.

步骤 Steps

# 做什么Do this 你会看到What you get
1 在 Profile: 里选一份 Skeletal Mesh LOD Settings;没有就按 Generate Asset 新建一份并在这里选中,然后自己填它的逐档条目。Pick a Skeletal Mesh LOD Settings in Profile:; if you have none, press Generate Asset to create one, select it here, and author its per-level entries. 未选 profile 时,面板下方会给一行提示,Apply 保持不可用。Without a profile a hint line appears below, and Apply stays disabled.
2 定范围:Scope: 目录(可 Recursive)、Use Selection,或把骨骼网格拖进表格。Set the scope: Scope: folder (optionally Recursive), Use Selection, or drag skeletal meshes into the table. 除了勾选列与网格名,表里还有 LODs、Target、Thresholds、Status:当前档数、profile 要求的档数、当前逐档阈值、判定与原因。Besides the tick column and the mesh name, the table carries LODs, Target, Thresholds and Status: the current count, the count the profile asks for, the current per-level thresholds, and the verdict with its reason.
3 按 Scan。每行得到一个判定:Clean(已一致)、Drift(需要改)、Blocked(工具处理不了,原因写在行里)。Press Scan. Each row gets a verdict: Clean (already matches), Drift (needs changing) or Blocked (the tool cannot act on it; the row says why). 摘要行给出各判定的计数。行可以逐条勾掉——未勾选的行不参与 Apply。The summary reports the count behind each verdict. Rows can be unticked individually — an unticked row is excluded from Apply.
4 需要重造阶梯时勾 Rebuild from LOD0(只影响静态网格行),然后按 Apply (n),n 是当前勾选且漂移的网格数。Tick Rebuild from LOD0 when the ladder itself must be rebuilt (it only affects static rows), then press Apply (n) — n is the number of ticked, drifting meshes. 逐网格处理并逐个保存;进度窗标题是 Standardize LOD,可以取消,取消后已完成的网格保持存盘。Meshes are processed and saved one at a time; the progress window is titled Standardize LOD and can be cancelled, after which finished meshes stay saved.
5 Apply 之后再按一次 Scan——它就是这一步的验证。Press Scan again after Apply — that is the verification for this step. 原先的 Drift 行应当变成 Clean。剩下的 Blocked 行说明工具这一侧仍有拦路条件。The former Drift rows should read Clean. Any Blocked rows left name a blocker on the tool's side.

它改什么 What it changes

每次都有一份可回滚的报告。一轮 Apply 会在 Saved/MassBattle/LODReports 下写一份 JSON,逐网格记录旧值与新值——坏批次靠它手动改回来,而不是撤销,工具刻意不跨几十个包做事务。勾了 Rebuild from LOD0 的那一轮,丢弃的几何无法从报告恢复,报告只保住数值。

Every run leaves a rollback report. Each Apply writes one JSON file under Saved/MassBattle/LODReports recording the old and new values per mesh — a bad batch is undone by hand from that report, not by undo, because the tool deliberately does not run a transaction across dozens of packages. In a run with Rebuild from LOD0, the discarded geometry is not recoverable from the report; only the numbers are.

会拒绝或阻断的情形 Refusals and blockers

情形Case 你会看到What you see
profile 本身不能用:没有条目、阈值不是严格递减、百分比不在 (0,1] 内或不是单调不增An unusable profile: no entries, thresholds that do not strictly descend, or percentages outside (0,1] or not monotonic non-increasing 扫描直接拒绝并说明哪一条不成立。一条不递减的阶梯根本没有切换顺序,两条路径都无从判定。The scan refuses and names the rule that broke. A ladder that does not descend has no switch order, so neither path can judge against it.
没有安装骨骼网格减面模块No skeletal mesh reduction module installed 需要重建几何的漂移行被判 Blocked 并写明原因;勾 Rebuild from LOD0 时整段一行拒绝,而不是先把作者数据清掉再逐个失败。Drift rows that need geometry are marked Blocked with that reason, and a Rebuild from LOD0 request is refused in one line instead of clearing authored data first and then failing mesh by mesh.
profile 的档数超过引擎上限(静态网格)A profile with more levels than the engine caps for static meshes 静态行整批判 Blocked:构建器产出不了的档数,规范化没有意义。骨骼侧没有这个上限。Every static row is Blocked: standardising to a count the builder cannot produce means nothing. The skeletal side has no such cap.
静态网格的深档低于简化器的三角面地板A static level below the simplifier's triangle floor 不是拒绝,是备注:扫描备注、应用日志与报告逐网格点名预计被地板吞掉的档,措辞是预估而非承诺。静态简化器与骨骼减面器能到的深度本来就不同。Not a refusal but a note: scan notes, the apply log and the report name the levels a floor is expected to swallow, per mesh, phrased as an estimate rather than a promise. The static simplifier and the skeletal reducer simply reach different depths.
工具能修,但修完仍会撞烘焙门A mesh the tool can fix but that would still fail a bake gate 这类信息进扫描备注,不是 Blocked——规范它仍然是进展。That lands in the scan notes, not in Blocked — standardising it is still progress.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
LOD.Scan 对着一个 profile 判定一批网格;结果里有逐行判定、阈值、组 lint 与备注。Judge a batch against one profile; the result carries per-row verdicts, thresholds, group lint and notes. 不写。Nothing.
LOD.Apply 把漂移行推到 profile;dryRun=true 只报将应用多少行;rebuildFromLOD0 对应面板上的同名勾选框。Push drift rows onto the profile; dryRun=true only reports how many rows would change; rebuildFromLOD0 is the panel's checkbox of the same name. 网格资产,外加 Saved/MassBattle/LODReports 下的一份 JSON 报告。Mesh assets plus one JSON report under Saved/MassBattle/LODReports.

批量改名 Batch Rename

改名工具只改资产名,永远不动目录。它一条规则、一份计划、一次应用:规则是「前缀 + 原名(查找替换)+ 后缀」,可以按类型过滤,查找可以区分大小写。预览与应用读的是同一条规则,所以标成 Ok 的行正是应用会去改的行。

The rename tool changes asset names and never moves a folder. One rule, one plan, one apply: the rule is "prefix + old name (find → replace) + suffix", optionally filtered by asset kind, with an optional case-sensitive find. The preview and the apply read the same rule, so a row marked Ok is exactly a row Apply will attempt.

规则的形状 The shape of a rule

字段Field 含义Meaning
find / replace 一次子串替换。find 留空则跳过替换,纯前后缀规则只填那两个。One substring replacement. An empty find skips the pass, so a pure prefix/suffix rule fills only those two.
prefix / suffix 替换之后加在最前 / 最后。最终结果形如 前缀 + 替换后的名字 + 后缀。Added after the replacement, at the front and the back. The final name reads prefix + replaced name + suffix.
matchCase 查找是否区分大小写。关掉就替换这个名字的每一种大小写写法。Whether find is case-sensitive. Off replaces every casing of it.
kinds 规则可以处理的类型:SkeletalMesh、StaticMesh、Material、MaterialInstance、AnimSequence、Texture、DataAsset、Other。留空表示全部类型,所以省略它不会收窄范围。The kinds the rule may touch: SkeletalMesh, StaticMesh, Material, MaterialInstance, AnimSequence, Texture, DataAsset, Other. Empty means every kind, so omitting it narrows nothing.

预览与应用 Preview vs. apply

先 BatchRename.Scan:它只解析路径、算出新名字、给出状态,不写任何东西。看清楚了再 BatchRename.Apply:全部改名发生在一个事务里,一次 Ctrl+Z 整批回退;应用之前会逐行向资产注册表复查新路径——预览与这次调用可能隔了几分钟,期间被占用的路径绝不能被覆盖。

Start with BatchRename.Scan: it resolves paths, computes the new names and hands back statuses without writing anything. Then BatchRename.Apply: the whole rename happens inside one transaction, so one Ctrl+Z undoes the batch; before renaming, every new path is re-checked against the asset registry, because the preview and this call can be minutes apart and a path taken in between must never be overwritten.

状态Status 含义Meaning
Ok 名字会变,新路径无人占用:这一行会被改名。The name changes and the new path is free: this row will be renamed.
Unchanged 规则算出来的名字与原名相同。The rule computes the name the asset already has.
Collision 新路径已被占用——被别的资产,或被同一份计划里更早的一行。永不尝试,因为改过去就是覆盖别人的资产。撞名是状态而不是错误:目录级的加前缀规则本来就常产生两行想要同一个名字。The new path is taken — by another asset, or by an earlier row of the same plan. It is never attempted, because going ahead would overwrite someone's asset. A collision is a status rather than an error: a folder-wide prefix rule routinely makes two rows want the same name.
Skipped 这一行不改:类型被 kinds 筛掉,或算出的名字不能作为资产名。原因写在 Notes 里。Other 类型的行永远落在这里。Not renamed: the kind is filtered out by kinds, or the computed name cannot be an asset name. Notes says which. A row of kind Other always ends up here.

改名不会改目录。同时改包的"重命名"会打断重定向修复跟不上的引用,所以工具只换名字。要换目录请用复制到新路径或按目录整理后再改名。

A rename never moves a folder. Renaming that also changed the package would break references the redirector fix-up cannot follow, so only the name changes. To move an asset, copy it to a new path or reorganise folders first, then rename.

范围里的路径一个都没在资产注册表里找到时,两条命令都直接拒绝,而不是返回一张空表——打错的路径与空目录看起来必须不一样。路径解析不了的会单独列在载荷里。

If none of the paths in scope resolves in the asset registry, both commands refuse instead of returning an empty table — a typo must not look like an empty folder. Paths that do not resolve are listed separately in the payload.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
BatchRename.Scan 预览:逐行的旧名、新名、包路径、类型、状态、原因,以及四个状态的计数。Preview: old name, new name, package path, kind, status and reason per row, plus counts per status. 不写。Nothing.
BatchRename.Apply 应用;dryRun=true 只报"会改多少条"。Apply; dryRun=true only reports how many assets would be renamed. 改名后的资产(同一个事务),失败的逐行报在 errors 里。The renamed assets (one transaction), with per-row failures in errors.

升级旧版资产 Upgrading Legacy Assets

这是给从 1.19 带过来的工程用的一步。旧版 ATT 数据资产在 1.20 里已经能打开——插件自带的重定向会把它读成当前类;真正过期的只是文件里记录的类名。这个工具做的全部工作就是:找到这些资产,加载一次、保存一次,让类导入与资产注册表数据按当前类重写。

This step is for projects carried over from 1.19. A legacy ATT data asset already opens in 1.20 — the redirects the plugin ships make it load as the current class; what is actually stale is the class name recorded inside the file. All this tool does is find those assets and load-and-save each one, so the class import and the package's asset-registry data are rewritten from the current class.

什么算旧版:文件里存的类不是当前类。不看目录、前缀、名字或年代。所以 1.19 烘出来的每一份 ATT 数据资产都会被认出来,而一个"只是引用过旧模块"的资产不会——判据读的是包内存储的类名,不是文件里出现过的模块名。

What counts as legacy: the class stored in the file is not the current one. No folder, prefix, name or age heuristic is involved. Every ATT data asset a 1.19 bake produced is therefore recognised, while an asset that merely references an old module is not — the test reads the class name recorded in the package, not a module name that happens to appear in the file.

它能修什么、不能修什么 What it fixes and what it cannot

结果Outcome 说明Meaning
已升级Upgraded 资产被重存,存储类改写成当前类。没有重烘、没有改名、没有删除,重定向原样不动。每一次都会重读存储类来核对——保存返回成功、类却仍旧的,按失败报。The asset is re-saved and its stored class becomes the current one. No re-bake, no rename, no delete, and the redirects stay exactly as they are. Every save is verified by re-reading the stored class — a save that reports success while leaving the class stale is reported as a failure.
被拒绝(需要重烘)Refused (needs a re-bake) 资产加载回来时片段数组是空的。保存这个状态等于把"坏了但还能救"固化成"坏了且已经写盘",所以整份资产不被保存,也不算作失败——正确的处置是回烘焙面板重烘它。The asset came back with an empty clip array. Saving that would turn "broken but recoverable" into "broken and persisted", so the asset is not saved at all, and it is not folded into failures either — the right response is to re-bake it in the bake panel.
被拒绝(读不出来)Refused (unreadable) 资产没能加载成 ATT 数据资产。什么都不猜,也不保存。The asset did not load as an ATT data asset. Nothing is guessed and nothing is saved.
跳过Skipped 三种:已经是当前类(绝不"再存一次保险");不在可写范围(只有工程自己的内容根与工程目录下的插件可写,引擎内容与引擎目录下的插件一律跳过并报告);包头的存储类读不出来。Three kinds: already current (never "saved again to be sure"); out of scope (only the project's own content roots and the plugins under the project's Plugins folder are writable — engine content and engine-directory plugins are skipped and reported); or the package's stored class could not be read.

步骤 Steps

1. 先试运行。命令是 Content.UpgradeLegacyAssets,它不带参数——范围就是整个工程。试运行返回同一份扫描:会升级的目标(每行附上据以判定的存储类)、被拒绝的项、被跳过的项,各自带原因,但一个字节都不写;因为什么都没写,已写与失败两栏都是空的。试运行也会做那道片段检查,所以你看到的就是真实运行会拿到的判词。

1. Dry-run first. The command is Content.UpgradeLegacyAssets and it takes no arguments — the scope is the whole project. A dry run returns the same scan: the upgrade targets (each with the stored class that justified it), the refused rows and the skipped rows, each with its reason, and writes not one byte; with nothing written, the written and failed counts are both zero. It also runs the clip check, so the verdict you read is the verdict a real run would reach.

2. 看清被拒绝的项。被拒绝的资产不会在这次升级里变好:回去重烘它们,再重跑一次升级。跳过项不需要动作。

2. Read the refused rows. A refused asset does not improve through this upgrade: re-bake it, then run the upgrade again. Skipped rows need nothing.

3. 真跑。工具会按插件的确认策略征求一次确认(有人看着的编辑器里弹窗,自动化运行按策略作答且永不阻塞),然后逐个资产加载、重存。单个资产失败只报告、批量继续。

3. Run for real. The tool asks for one confirmation through the plugin's confirm policy (a dialog in an editor someone is watching; an automation run answers by policy and never blocks), then loads and re-saves the assets one at a time. One failing asset is reported and the batch continues.

它原地改写资产文件,删一个副本来回滚是不行的。本功能的意义正是原文件被改了。跑之前先提交或备份工程,并先把试运行的清单看完。另外:如果某份包原本就有未保存的改动,这次保存会把它们一并写入——结果里会标出来。

It rewrites asset files in place, and deleting a copy will not undo it. The whole point of the feature is that the original file changed. Commit or back up the project first, and read the dry-run list to the end. Also: if a package already had unsaved edits, this save commits them too, and the result says which ones.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
Content.UpgradeLegacyAssets 工程刚从 1.19 升级上来,或你想确认还有没有旧版 ATT。试运行列出目标、被拒绝与被跳过的行;真跑逐个重存。The project just came up from 1.19, or you want to confirm no legacy ATT is left. A dry run lists the targets, the refused rows and the skipped rows; a real run re-saves each asset. 重存的 ATT 资产(原地)。已写出的路径在 written,被拒绝与失败的逐行列出。The re-saved ATT assets, in place. Written paths are in written; refused and failed rows are listed individually.

材质与槽位工具 Material and Slot Tools

这一组处理"材质太多、槽位太碎"。三个方向:把一张网格上的多个材质槽烘成一张图集与一个槽;把散落的材质实例收到一个父级上;以及造一张 sprite 单位的母材质。

This group deals with too many materials and too many slots. Three directions: bake a mesh's several material slots into one atlas and one slot; collapse scattered material instances onto one parent; and build the master material a sprite unit needs.

槽位合并:先看哪些槽真的能收 Slot merge: find out which slots can actually collapse

SlotMerge.Scan 是只读的:每个网格的每个槽一行,给出网格、LOD、槽号、槽名、材质、三角面数,以及它与同网格其它槽的关系分类——Identical(完全相同)、Empty(空槽)、ParamsOnly(只有参数不同)、TexturesOnly(只有贴图不同)、Incompatible(不兼容),另加一行说明。整份扫描最后给一个 mergeable 标记。先看这张表,再决定要不要烘:把不兼容的槽挑出来是这一步的全部价值。

SlotMerge.Scan is read-only: one row per slot of every mesh, giving the mesh, LOD, slot index, slot name, material, triangle count and how that slot relates to its siblings — Identical, Empty, ParamsOnly (only parameters differ), TexturesOnly (only textures differ) or Incompatible — plus a note. The scan ends with one mergeable flag. Read that table before baking: finding the incompatible slots is the whole value of this step.

槽位合并:烘成一张图集 Slot merge: bake into one atlas

选项Option 默认Default 含义Meaning
atlasSize 1024 图集的边长(像素)。任何正整数都能烘,不是 2 的幂也可以;建议用 2 的幂,纯色槽 512 已够。Atlas edge in texels. Any positive integer bakes, powers of two are only recommended; 512 is plenty for flat-colour slots.
rescaleUvToTile 关Off UV0 越出 [0,1] 的平铺 UV 网格:开它就把 UV 重铺进格子,而不是拒绝这张网格。For a mesh whose UV0 leaves [0,1]: turn it on to rescale the tiling into the tile instead of refusing that mesh.
overwriteSource 关Off 把烘好的网格写回源资产,而不是写一份副本。关着时源就是回滚。Writes the baked mesh onto the source instead of a copy. Off means the sources are the rollback.
overwriteOutput 关Off 删掉本工具上一次的产物——网格副本与它的 Tex_<名>_SlotMerged 图集目录——直接用规范名重写,而不是叠出 _1。删除做不干净时这一轮直接失败、不分叉;输入网格不动。Deletes this tool's previous output — the mesh copy and its Tex_<name>_SlotMerged atlas folder — and reuses the canonical name instead of forking a _1. A deletion that cannot finish fails the run rather than forking; the input mesh is untouched.
maskedMode off 遮罩网格的处理方式,见下面的警告。How masked meshes are handled — see the warning below.

烘出来的是什么:一份网格副本、一个材质槽、一张图集。合并后的网格指向的是图集母材质在这张网格上的一份副本(落在该网格自己的 Tex_<副本名> 目录里,名字带 _SlotAtlasMaster),八张图集贴图写在这份副本自己的纹理参数默认值里。工具不创建材质实例。之所以每个网格留一份母材质副本,是为了让每张烘好的图集自成一体:插件升级换掉随包的母材质时,不会悄悄改掉你烘出来的东西。

What comes out: a mesh copy, one material slot, one atlas. The merged mesh points at a per-mesh copy of the atlas master (inside that mesh's own Tex_<copy name> folder, named with _SlotAtlasMaster), with the eight atlas textures written into that copy's own texture-parameter defaults. The tool creates no material instance. The per-mesh copy exists so each baked atlas is self-contained: a plugin update that replaces the shipped master cannot silently change what you baked.

遮罩网格默认被拒。maskedMode 有四个取值:off(默认,拒绝每个遮罩网格)、on(实验性,不受支持)、opaque(安全路径:把材质链复制成不透明再烘那份副本,镂空是有意丢弃的)、probe(保住镂空,且不编译任何遮罩排列)。写别的任何取值都会直接报错,而不是被猜成某一个。opaque 下"镂空即将被丢弃"会同时出现在预览与最终消息里,不会藏在一句"可烘"后面。

Masked meshes are refused by default. maskedMode takes four values: off (the default, refusing every masked mesh), on (experimental and unsupported), opaque (the safe path: each material chain is cloned as Opaque and that clone is baked, knowingly dropping the cutout), and probe (keeps the cutout without ever compiling a masked permutation). Any other spelling is an error rather than a guess. Under opaque, "the cutout is about to be dropped" appears in both the preview and the final message instead of hiding behind an "eligible" verdict.

烘焙时有一道进度窗(标题 Slot Merge),可以取消。取消不是失败:已经写出的网格留在磁盘上,还没轮到的分毫未动,结果的消息只数已经落地的那些。规划阶段被判为不可烘的网格会被跳过而不是硬烘,报告会点名它和原因。

A bake shows a progress window titled Slot Merge with a Cancel button. Cancelling is not a failure: meshes already written stay on disk, the rest are untouched, and the message counts only what landed. A mesh the planning pass marked ineligible is skipped rather than forced, and the report names it with the reason.

材质父级合并 Material parent merge

面板标题是 Material Parent Merge。它把"同一张底图派生出来的一堆材质实例"收成一个父级:给实例换父级、为直接挂在槽位上的普通材质建一份实例、把生效参数完全相同的实例折叠成一个。分组按基底图的签名,同一组的父级可以是现有材质里参数覆盖最全、引用最多的那一个,也可以新建一份(默认落在代表材质旁边)。

The panel is titled Material Parent Merge. It collapses "a pile of instances derived from the same base graph" onto one parent: reparenting instances, creating an instance for a plain material that sits directly on a slot, and folding instances with identical effective values into one. Grouping follows the base graph's signature; a group's parent can be the existing material that covers every member's parameters and has the most referencers, or a newly created one (placed beside the representative by default).

先 MaterialMerge.Analyze 拿计划——它只统计不改动,会给出组数、条目数、重挂数、新建实例数、折叠数、引用数与计划说明。计划被拒绝(blocked)与"干到一半被取消"是两件事,载荷里分开报。看清后再 MaterialMerge.Apply;应用有一道可取消的进度窗(标题 Material Merge),取消发生在组与组之间,已合并的组保持已写出。

Start with MaterialMerge.Analyze: counts only, never mutating — groups, items, reparents, new instances, collapses, referencers and the plan's own lines. A refused plan (blocked) and a run stopped part-way are two different things and are reported separately. Then MaterialMerge.Apply; the apply has a cancellable progress window titled Material Merge, a cancellation lands between groups, and merged groups stay written.

为什么先合源材质。烘焙对每个不同的源材质各推出一份 VAT 母材质,所以"母材质太多"唯一持久的解法是把源材质先合掉:所有槽位解析到同一个原生父级之后,烘焙自己的命名规则自然只产出一份。这一步也可以顺带整理上一次烘焙已经产生的母材质,但那只有在同一次操作里跑过源材质合并时才持久。

Why merge the source materials first. The bake derives one VAT master per distinct source material, so the only durable way to end up with fewer masters is to merge the source materials first: once every slot resolves to the same native parent, the bake's own naming rule produces one master by itself. A run can also tidy the masters a previous bake already produced, but that only holds if the source pass ran in the same operation.

另外两条材质命令 Two more material commands

Material.BuildSpriteMaster 造一张全新的 sprite 母材质:UNLIT、MASKED、双面、attributes 驱动,而且是纯透传——一个空的 MakeMaterialAttributes 接到适配器唯一的 attributes 输入,适配器的第一个输出接到材质的 attributes 根,此外不接任何东西。图集采样、格子与帧号解码、透明度遮罩全在适配器函数内部,所以母材质自己不接像素。它只写新资产:目标包已存在就拒绝并让你换一个名字(在用的母材质删不掉,原位重建只会留下旧图加一条修不了的失败)。

Material.BuildSpriteMaster builds a fresh sprite master material: UNLIT, MASKED, two-sided and attributes-driven, as a pure pass-through — an empty MakeMaterialAttributes feeds the adapter's single attributes input, and the adapter's first output drives the material's attributes root; nothing else is wired. Atlas sampling, cell and frame decoding and the opacity mask all live inside the adapter function, so the master wires no pixels of its own. It writes a new asset only: an existing target package is refused and you are asked for another name (an in-use master cannot be deleted, and rebuilding in place would leave the old graph behind plus a failure you cannot fix from there).

Material.DescribeFunctionPins 是只读的:列出一个材质函数的输入与输出引脚及可读类型,让脚本或外部工具能创建并接线 MaterialFunctionCall 节点,而不必打开材质图。函数输出在引擎里不存类型(引脚类型由喂给它的表达式决定),所以输出的类型如实报成 unknown,不猜。

Material.DescribeFunctionPins is read-only: it lists a material function's input and output pins with a readable type, so a script or an external tool can create and wire a MaterialFunctionCall node without opening the graph. The engine stores no type on a function output (its pin type is whatever feeds that output), so an output's type is honestly reported as unknown rather than guessed.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
SlotMerge.Scan 烘图集之前先看槽位关系与 mergeable。Before baking an atlas: see the slot relationships and the mergeable flag. 不写。Nothing.
SlotMerge.BakeAtlas 把网格烘成一张图集与一个槽;dryRun=true 逐网格报计划(可烘 / 拒绝原因 / 会不会丢镂空)。Bake meshes into one atlas and one slot; dryRun=true reports the plan per mesh (eligible, refusal, whether a cutout would be dropped). 网格副本、图集贴图、逐网格的图集母材质副本。The mesh copy, the atlas textures and the per-mesh atlas-master copy.
MaterialMerge.Analyze 拿一份父级合并计划,不写任何东西。Get a parent-merge plan without writing anything. 不写。Nothing.
MaterialMerge.Apply 执行计划:重挂父级、建实例、折叠同值实例。Execute the plan: reparent, create instances, collapse identical ones. 材质、材质实例(按需新建的母材质也在内)。Materials and material instances, including any parent created on demand.
Material.BuildSpriteMaster 要一张自己的 sprite 母材质、且还没有现成的。When you need your own sprite master and none exists yet. 一张新材质。One new material.
Material.DescribeFunctionPins 要以编程方式接线材质函数节点。When a material-function node must be wired programmatically. 不写。Nothing.

骨架 socket Skeleton Sockets

挂件要靠 socket 挂到身上,但演示骨架出厂就没有手部 socket,而 socket 数组在编辑器 UI 之外够不到。这一组命令补的就是这个缺口:读列表、加一个、删一个。

An attachment needs a socket to hang from, but the demo rigs ship with no hand socket, and the socket array is unreachable outside the editor UI. This group of commands closes that gap: read the list, add one, remove one.

socket 最终落在哪 Where a socket ends up

它存在骨架资产自己身上。socket 是挂在骨架上的一个对象,跟着骨架的包一起存盘;新加的排在数组最后,因为添加就是追加。Persona 的 socket 树看到的是同一份,所以命令写完、打开骨架就能看到。装配模板里给附件选父件与 socket 时,能选的就是这一份列表。

It lives on the skeleton asset itself. A socket is an object owned by the skeleton and saved with its package; a newly added one sits last, because adding appends. Persona's socket tree reads the same list, so a socket written by a command is there when you open the skeleton. Choosing a parent part and socket for an attachment in an assembly template picks from exactly this list.

运行时按名字解析,骨没了 socket 不会消失。在 Persona 里删掉一根骨之后,骨架上的 socket 会继续指向一个解析不出的骨名;每次查找都会悄悄退到组件原点,看起来就是"挂件掉在脚下"。Skeleton.Sockets 的每一行都带 boneExists,正是为了让这件事在动工前就看得见。

The runtime resolves by name, and a socket outlives its bone. Delete a bone in Persona and the skeleton's sockets keep pointing at a name nothing can resolve; every lookup silently falls back to the component origin, which looks like "the attachment dropped to the feet". Every row from Skeleton.Sockets carries boneExists precisely so this is visible before it bites.

步骤 Steps

1. 先读。Skeleton.Sockets 给出这份骨架的全部 socket(名字、父骨、相对位移 / 旋转 / 缩放、boneExists)以及按骨架顺序排列的骨名列表。2. 加一个。Skeleton.AddSocket:给名字、父骨名、相对变换。父骨必须在这副骨架的参考骨架里,否则命令拒绝并报出骨数——最常见的原因是名字取自另一副骨架。3. 删一个。Skeleton.RemoveSocket 会删掉所有同名 socket,这样反复跑仍收敛到零。

1. Read first. Skeleton.Sockets returns every socket on the skeleton (name, parent bone, relative location / rotation / scale, boneExists) plus the bone names in skeleton order. 2. Add one. Skeleton.AddSocket takes a name, a parent bone and a relative transform. The bone must exist in this skeleton's reference skeleton, otherwise the command refuses and reports the bone count — the usual cause is a name taken from a different rig. 3. Remove one. Skeleton.RemoveSocket deletes every socket carrying that name, so repeated runs converge to none.

会拒绝的情形 What it refuses

情形Case 你会看到What you see
skeleton 指不到骨架skeleton names no skeleton 分开报三种情形:路径上什么都没有、加载失败、那里是别的类型(消息里写出实际类型)。Three outcomes are told apart: nothing at that path, it did not load, or it is a different type (the message names the type it found).
name 或 bone 为空An empty name or bone 拒绝。没有名字的 socket 之后既查不到也删不掉;挂在空骨上的 socket 没有父骨,每个使用方都会把它解析到组件原点。Refused. An unnamed socket can never be found or removed again; a socket on an empty bone has no parent and every consumer resolves it to the component origin.
父骨不在参考骨架里The parent bone is not in the reference skeleton 拒绝,消息点名骨与骨数;载荷仍然给出整份 socket 与骨名列表,你不必再花一次调用去挑骨名。Refused, naming the bone and the bone count; the payload still carries the whole socket and bone list, so picking a name costs no extra call.
变换数组不是三个有限数字A transform array that is not three finite numbers 拒绝,并指出是哪个参数的第几个分量。给了但写错的 [x,y,z] 一律拒绝、绝不套默认值——被悄悄变成 0 的三元组会把 socket 丢在骨的原点上还报成功。NaN 与无穷同样在这里挡住。Refused, naming the argument and which component. A present-but-wrong [x,y,z] is never defaulted — a triple silently turned into zero would drop the socket on the bone's own origin and still report success. NaN and infinity stop here too.
同名 socket 已存在,且 replaceExisting=falseA socket of that name exists and replaceExisting=false 以 Exists 失败。默认是 true:先删同名再新建,所以反复跑之后仍然恰好一条——加 socket 这个动作天生幂等。Fails with Exists. The default is true: the existing socket of that name is removed before the new one is created, so re-runs leave exactly one — adding is idempotent by construction.
写盘失败The save to disk fails 命令报失败而不是报成功:内存里的骨架已经改了、磁盘上却什么都没有,那正是绝不能让人相信的状态。save=false 时只改内存、不写盘,消息里会写明没保存。The command reports failure, not success: the in-memory skeleton changed while nothing reached the disk, which is exactly the state nobody may believe in. With save=false only memory changes and the message says it was not saved.
要删的名字不存在Removing a name that matches nothing 不算错误——你的目标(没有这个名的 socket)本来就已经成立——但载荷里 removed 是 false,而且包既不会被标脏也不会重写。Not an error — the goal (no socket by that name) already holds — but removed is false in the payload, and the package is neither dirtied nor rewritten.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
Skeleton.Sockets 核对挂件要用的 socket 在不在、父骨还在不在。Check that the socket an attachment needs exists and that its bone still does. 不写。Nothing.
Skeleton.AddSocket 给骨架加一个挂点;默认替换同名 socket,可反复跑。Add a mount point; the same-named socket is replaced by default, so it can be re-run. 骨架包(save=true 时)。The skeleton package, when save=true.
Skeleton.RemoveSocket 删掉某个名字的全部 socket。Remove every socket carrying a name. 骨架包(真的删掉了东西且 save=true 时)。The skeleton package, when something was actually removed and save=true.

运行时烘焙探针 The Runtime-Bake Probe

它回答的只有一个问题:如果把这批骨骼动画的贴图生成从烘焙期挪到 spawn 期,在你这台机器上要多少毫秒、产物多大?它不是功能开关,也不会改变任何烘焙产物——它是一次测量。

It answers one question: if generating these bone animation textures moved from bake time to spawn time, how many milliseconds would that cost on your machine, and how big is the result? It is not a switch and it changes no bake product — it is a measurement.

为什么要分阶段 Why the phases are timed apart

阶段Phase 它包含什么What it covers 随什么增长What it scales with
sampleMs 逐片段采样循环的总和。参考姿势块与采样骨架的生成都不在任何计时里,所以这个数就是采样本身。The sum of the per-clip sampling loops. The reference-pose block and the sampling component's creation are outside every timer, so this number is sampling itself. 片段数 × 帧数 × 骨数。Clip count × frame count × bone count.
packMs 归一化 + 两张贴图的像素编码与填充。Normalisation plus the pixel encode and fill of both textures. 打包后的面积,以及帧数。The packed area, and the frame count.
createMs 两张瞬态贴图的创建(含引擎在创建时做的那次空资源分配)。Creating the two transient textures, including the empty-resource allocation the engine does at creation. 贴图尺寸。Texture size.
uploadMs 两次上传并等渲染线程排干,所以它覆盖 mip 真正到达渲染线程,而不只是入队。Two uploads plus a flush of the render thread, so it covers the mip actually reaching the GPU side rather than just being enqueued. 贴图尺寸。Texture size.
totalMs 上面四项之和。The sum of the four above. ——
postEditChangeMs 不在 totalMs 里:那是编辑器为贴图跑的一次材质依赖扫描,单独报出来,好让你分清 packMs 里有多少其实不是打包。Outside totalMs: an editor-only material-dependency scan each texture write pays. Reported separately so you can tell how much of packMs is not packing. ——

怎么用 How to run it

ATT.ProbeRuntimeBake 要三个参数:mesh(采样用的骨骼网格)、assetPath(提供片段表、采样率、精度与贴图上限的 ATT 资产)、iterations(跑几轮,夹在 1..5;多跑几轮能把冷启动与后续几轮分开)。它什么都不写、什么都不保存:采样组件是瞬态生成、返回前销毁,两张贴图是瞬态的、用完立即释放,ATT 全程只读。

ATT.ProbeRuntimeBake takes three arguments: mesh (the skeletal mesh to sample with), assetPath (the ATT that supplies the clip table, sample rate, precision and texture limits) and iterations (how many runs, clamped to 1..5; more than one separates the cold run from the warm ones). It writes and saves nothing: the sampling component is spawned transient and destroyed before returning, both textures are transient and released immediately, and the ATT is only ever read.

怎么读结果:perIteration 每轮一行,四项加总数;perClip 报的是最后一次迭代的逐片段采样时间,perClipIteration 指明是哪一次。另有 frames、bones、textureWidth / textureHeight、rowsPerFrame、bytes / bytesPerTexture。如果这份 ATT 之前烘过,countsMatchAssetBake 会把它存的帧数 / 骨数与这次探针数出来的对比——对不上说明资产是在片段或采样率改动之前烘的,或者探针与真烘焙已经不一致。

Reading the result: perIteration holds one row per run with the four phases and the total; perClip reports the last iteration's per-clip sampling time, and perClipIteration says which one. You also get frames, bones, textureWidth / textureHeight, rowsPerFrame and bytes / bytesPerTexture. If the ATT has been baked before, countsMatchAssetBake compares its stored frame / bone counts against what this probe counted — a mismatch means the asset was baked before its clips or sample rate changed, or that the probe and the real bake have drifted apart.

会被拒绝的情形 What it refuses

它不改任何东西,包括 ATT 的模式。如果 ATT 的 Mode 不是 Bone,探针照样能跑,数字是这批片段与骨架的骨骼贴图成本——说明里会写明这一点,而不是拒绝一个本来可测的资产。所以它的用途很清楚:在决定"预烘还是 spawn 时生成"之前先量一次;或者在跑一次长烘焙之前,先用它确认这份资产的片段表、骨架与贴图上限是对得上的。

It changes nothing, including the ATT's mode. If the ATT's mode is not Bone the probe still runs, and the numbers are the bone-texture cost of those clips and that skeleton — the notes say so rather than refusing a measurable asset. That makes the use clear: measure once before deciding between pre-baking and generating at spawn, or run it before a long bake to confirm that the asset's clip table, skeleton and texture limits line up.

命令 Commands

命令 idCommand id 什么时候用Use it when 写什么Writes
ATT.ProbeRuntimeBake 要一个"spawn 期生成要付多少"的数字,或想先确认一份 ATT 的配置能装下自己的数据。When you need a number for what spawn-time generation costs, or want to confirm an ATT's configuration can hold its own data. 不写。它连一份空包都不会留下。Nothing. It does not even leave an empty package behind.

一条常见的顺序 A Sensible Order

维护工作彼此有先后。下面这个顺序只是经验,不是规则——但它能避免"刚合完网格又得重命名"、"刚标准化完又把网格合并掉"这类返工。

Maintenance steps have an order. The one below is experience, not a rule — but it avoids rework such as "merged the meshes, now the names need changing again" or "standardised the LODs, then merged the meshes away".

1. 名字先定 Names first

先跑 Batch Rename:改名只动资产名、不动目录,所以越早做越便宜。合并与烘焙都会按当前名字生成新资产,先改名可以少改一轮。Run Batch Rename first: it changes only names and never folders, so the earlier it runs the cheaper it is. Merges and bakes derive new asset names from the current ones, so renaming first saves a round.

2. 标准与档数 Standard and level count

再跑 LOD Standardization。合并要求同骨架的网格档数一致,所以先标准化再合并,比合并完发现档数不齐再拆开要省事。Then LOD Standardization. A merge requires meshes of one skeleton to share a level count, so standardising before merging beats discovering a mismatch after it.

3. 几何收成一份 Collapse geometry

再决定哪些部件该用 Merge Meshes 合成一份。只合永远一起动的刚体件;会各自动画的留着。Decide which parts should become one mesh with Merge Meshes. Merge only the rigid pieces that always move together; keep what animates on its own.

4. 材质与槽位 Materials and slots

最后处理材质:先 Material Parent Merge 把源材质收到一个父级,再考虑 SlotMerge.BakeAtlas 把槽收成一张图集。顺序反了也能做,只是图集烘完再改父级要重烘一次。Handle materials last: collapse source materials onto one parent with Material Parent Merge first, then consider SlotMerge.BakeAtlas. The other order also works; it just means re-baking the atlas after the parent changes.

做之前的两条:旧工程先在试运行里看完 Content.UpgradeLegacyAssets 的清单再决定要不要真跑;要动骨架挂点就先跑一次 Skeleton.Sockets,确认挂件要用的名字与父骨都还在。所有"应用"类命令都会写资产文件——先在版本控制里留一个干净点,比事后找哪一份被改了要省事得多。

Two things before you start: on an inherited project, read the dry run of Content.UpgradeLegacyAssets before deciding to run it for real; and before touching skeleton sockets, run Skeleton.Sockets once to confirm the names and bones your attachments need are still there. Every apply-style command writes asset files — leaving a clean point in version control first beats hunting for which asset changed afterwards.

一个动作,两个入口 One Action, Two Doors

这一页讲的是整套工具最容易被人忽略的那一半:面板上绝大多数动作,背后都有一个同名的命令。你点按钮,是人在下这个单;你(或者一个 AI)敲一行命令,是同一个单走另一扇门。两边落到同一段实现上,所以命令能做到的事和按钮做到的事不会各说一套。少数还只能用面板做的动作,这一页末尾单独列了出来。

This section covers the half of the toolkit most people miss: most actions a panel offers are also named commands. Clicking a button is a human placing the order; typing a command — you, or an AI — places the same order through the other door. Both land on the same implementation, so a command and a button cannot disagree about what an action does. The few actions still limited to a panel are listed at the end of this section.

入口Door 谁来用Who Uses It 拿到什么What You Get Back
面板按钮A panel button 坐在编辑器前的人A person in front of the editor 窗口里的变化、日志里的一行行说明The window changes and the panel's own log lines
命令A command 人、脚本、AI——任何能敲一行字的东西A human, a script or an AI — anything that can type a line 一个结构化结果:成功与否、稳定的结果码、产物清单、载荷A structured result: success, a stable code, the outputs, a payload

命令返回一个结构化结果 A Command Returns a Structured Result

结果不是日志。日志是给人眼看的:文案会跟着语言变,详细级别也会被编译掉,任何靠解析日志判断成败的调用都会在某个版本上悄悄失效。命令给出的是五个固定的字段,程序可以据此分支、断言、决定下一步。

The result is not the log. A log is for human eyes: its wording follows the language setting and its verbosity can be compiled out, so anything that parses a log to decide success eventually breaks. A command answers with five fixed fields a program can branch on, assert against and plan from.

字段Field 内容What It Holds
ok 布尔总判定。注意批量命令部分成功时它是 false——要分支请看 code。The overall boolean. Note that a partly successful batch reports false — branch on code instead.
code 稳定的 ASCII 结果码,永不翻译、永不拼接你的数据。见下表。A stable ASCII code, never translated and never assembled from your data. See the table below.
message 给人读的一句话:哪里不对、要改什么参数、下一步怎么做。One human-readable sentence: what went wrong, which argument to fix, what to do next.
outputs 本次调用创建或修改的资产路径,可以直接拿去断言。The asset paths this call created or changed — assert on these directly.
data 这条命令自己的载荷:计数、逐项行、计划、回读值。每条命令的键都不一样。This command's own payload: counts, per-item rows, plans, read-back values. The keys differ per command.
结果码Code 含义与应对Meaning and Response
Ok 做成了。outputs 里是落盘的资产。It worked. outputs lists what reached the disk.
NoChange 请求合法,范围内没有要做的事。仍然算成功,什么都不用改。A valid request with nothing to do. Still a success; change nothing.
InvalidArgs 参数缺失或类型不对,message 会点名是哪个参数、该是什么类型。给一条不支持试运行的命令带上 dryRun,也会在这里被拒并告诉你把开关去掉。A missing or mistyped argument; message names the argument and its expected type. Passing dryRun to a command without dry-run support is refused here as well, telling you to drop the flag.
UnknownCommand 没有这个 id。先用 MassBattle.Mcp.List 核对。No such id. Check it against MassBattle.Mcp.List.
Refused 工具按自己的守卫拒绝了这次工作:资产不合要求、面板没开、目标已经存在、某条命令自己声明不做试运行。读 message 与 data.error,别原样重试。The tool declined: the asset does not qualify, the panel is not open, the target already exists, or that command itself declines a dry run. Read message and data.error; do not retry unchanged.
NeedsConfirmation 这一步需要确认,而你把确认策略设成了拒绝。无人值守时最安全的一条路。This step needs a confirmation and your policy said no. The safest answer for an unattended run.
Partial 一部分成功、一部分失败或被拒;逐项结果在 data 里。此时 ok 为假。Some items succeeded, some failed or were refused; the per-item rows are in data. ok is false here.
Cancelled 批量中途停下。已经写出的产物留在磁盘上,没轮到的没被碰过。(今天的批量路径上没有取消按钮,见下文。)A batch stopped early. What was already written stays on disk; what was not reached was untouched. (Today's batch path has no Cancel button — see below.)
Failed 跑完了但失败了。message 说原因,data 里通常有逐项细节。It ran and failed. message says why, and data usually carries the details.

人这一侧:在控制台里下单 The Human Side: Ordering from the Console

两个控制台命令就是全部的入口。先看有什么,再下单。结果都打在 Output Log 里——命令不靠视口告诉你成败,所以把那个窗口打开。

Two console commands are the whole entry point: list what exists, then invoke one. Everything prints to the Output Log — a command does not report success through the viewport, so keep that window open.

MassBattle.Mcp.List

每条命令打一行:id | Panel | destructive=true/false | args=...。参数会标出必填还是可选、是什么类型,例如 assets(required,string[])。destructive=true 表示这条命令会写资产,且不能靠删掉一份副本来撤销——下这类单之前先试运行。想知道你装的这一版到底有哪些 id,就以这个输出为准,不要照抄别处的名单。

One line per command: id | Panel | destructive=true/false | args=.... Each argument is marked required or optional and carries its type, e.g. assets(required,string[]). destructive=true means the command writes assets and deleting one copy cannot undo it — dry-run those first. Trust this output for the ids your build actually has rather than a list copied from elsewhere.

MassBattle.Mcp.List

MassBattle.Mcp.Invoke <Id> [jsonArgs] [jsonFlags]

第二条参数是这条命令的参数对象,第三条是调用开关。两个 JSON 都必须是一个带引号的整体——引号之外不能有空格,控制台是按空格切分的。

The second token is the command's argument object and the third is the invocation flags. Both JSON objects must arrive as one quoted token: the console splits on spaces, so no space may sit outside the quotes.

开关Flag 取值与作用Values and Effect
dryRun true / false。只报计划、不写盘。命令若不支持试运行,调用会被拒绝并告诉你把开关去掉。true / false. Report the plan and write nothing. A command without dry-run support refuses the call and tells you to drop the flag.
confirm "auto"(不传时的默认)、"reject"、"interactive"。见下一节。"auto" (the default when the token is omitted), "reject" or "interactive". See the next part.

先走通"看清现状"这一步。下面三次调用都不会改动任何资产:第一条与第三条只读,第二条只动页签。

Start by looking before you touch. None of these three calls changes an asset: the first and third only read, and the second only moves a tab.

  1. MassBattle.Mcp.Invoke Panels.Snapshot —— 报出每个面板开着还是没有;Creator 开着时还会带上它当前的资产名、输出目录和上次烘出的网格。reports which panels are open; when Creator is open it also carries that panel's asset name, output folder and last baked mesh.
  2. MassBattle.Mcp.Invoke Panels.Open {"panel":"MeshPrep"} —— 把某个面板的页签打开;已经开着就什么都不做,照样算成功。它只动页签,不碰资产。opens one panel's tab; an already-open tab is left alone and still counts as success. It moves a tab and touches no asset.
  3. MassBattle.Mcp.Invoke MeshPrep.GetAnimSets {"asset":"/Game/MassBattle/Demo/ATT_Hero.ATT_Hero"} —— 读一份动画资产的全部集合与桶。reads every set and bucket of one animation asset.

结果那一行怎么读 Reading the Answer

调用完成后输出一行摘要:先是命令 id,然后是结果码、成功标记、给人读的一句话、产物清单,最后是紧凑格式的载荷 JSON。载荷太长时会被截断,末尾写着 ...(truncated, N chars),N 是截断前的长度——看到这个标记说明还有内容没打全。

A finished call prints one summary line: the command id, then the code, the success flag, one human sentence, the output list, and finally the payload as compact JSON. An over-long payload is cut and ends with ...(truncated, N chars), where N is the length before the cut — that marker means you are not seeing all of it.

MeshPrep.GetAnimSets -> code=Ok ok=true message=... outputs=[] data={"assetPath":"...","sets":[...],"count":2}

确认:弹窗变成策略 Confirmation Becomes a Policy

有些动作本来会弹一个"要不要覆盖"的框。命令路径上没有框可点,所以这件事改由调用方在开关里表态。人点按钮时一切照旧——框还是那个框。

Some actions would normally raise an "overwrite?" dialog. A command path has no one to click it, so the caller states the answer in the flags instead. Clicking a button is unchanged — the dialog still appears.

你传的You Pass 会问的地方怎么答What a Prompt Site Answers 什么时候用它When To Use It
不传,或 "auto"Omitted, or "auto" 直接答"是",不弹窗。覆盖类确认因此会照做。Answers yes without a window, so an overwrite goes ahead. 你确实想让这次调用不受打扰地跑完When you do want the call to run through undisturbed
"reject" 直接答"否",需要确认的那一步不执行,什么都不写。这次拒绝可能以 NeedsConfirmation 回来,也可能以那条命令自己的失败码回来——两者都表示没有任何东西被写出。Answers no. The step that needed a human does not run and nothing is written. The refusal may come back as NeedsConfirmation or as that command's own failure code — either way, nothing was written. 无人值守的自动化:宁可被拒,也不要悄悄覆盖别人的东西Unattended automation: better refused than quietly overwriting someone's work
"interactive" 和点按钮一样:框会出现,调用停在那里等你回答。Exactly like a click: the dialog appears and the call waits for your answer. 你人在机器前,想看那个框You are at the machine and want the dialog

给脚本和 AI 用 "reject" 或 "auto"。"interactive" 会遇到"没有人来点"的局面,那一次调用就一直停着——真正让你等下去的是你选了一个需要人回答的模式,而不是有什么故障。

For scripts and AI, pass "reject" or "auto". "interactive" ends up waiting for a click that is not coming — what keeps you waiting is the mode you chose, not a fault.

批量动作:逐项看,不靠进度条 Batches: Read the Rows, Not a Progress Bar

图集烘焙、骨架合并这类一次处理很多资产的动作,是一次调用跑完再回来的:今天它们不弹进度窗,也没有取消按钮。所以判断成败的方式不是盯着窗口,而是读载荷里的逐项行——哪些写出来了、哪些被拒了、各自为什么。

Actions that touch many assets in one go — an atlas bake, a skeleton merge — run to completion and then return: today they raise no progress window and offer no Cancel button. So you judge them by the per-item rows in the payload — what was written, what was refused, and why — not by watching a window.

批量结果有三种要分清:Ok 全成了;Partial 一部分成了(ok 为假,逐项码在 data 里);Refused 或 Failed 一个都没写成。已经写出的资产在任何一种结果下都留在磁盘上——批量不会替你回滚。

Three batch outcomes are worth telling apart: Ok means all of it landed; Partial means some did (ok is false; per-item codes sit in data); Refused or Failed means none of it was written. Anything already written stays on disk in every case — a batch does not roll back for you.

让调用安全、可重复 Making a Call Safe and Repeatable

同一个命令层,换成一个 AI 来敲,需要的不是别的入口,而是几条纪律:它走的就是前面那两条控制台命令(列清单、下单),不需要控件、坐标或截图来驱动面板;从别的程序里调时,用的也是同一张命令表。下面九条覆盖了实际会踩的坑:地址怎么给、什么时候先试运行、怎么判成败、怎么在不问人的前提下把状态读回来。

The same command layer, driven by an AI, needs no other entry point — it needs a few rules. An agent uses the same two console entries (list, then invoke); it never drives a panel through widgets, coordinates or screenshots. Called from another program, it reads the same command table. The nine rules below cover the ground that actually bites: how to address things, when to dry-run first, how to judge success, and how to read state back without asking a human.

  1. id 用现成的,不要猜。命令 id 是稳定的 ASCII,但你装的这一版有哪些,以 MassBattle.Mcp.List 的输出为准。猜错 id 会得到 UnknownCommand,猜错参数名会得到 InvalidArgs 并点名那个参数。

    Use the ids that exist; do not guess. Ids are stable ASCII, but which ones your build has is answered by MassBattle.Mcp.List. A guessed id comes back UnknownCommand; a guessed argument name comes back InvalidArgs naming it.

  2. 用稳定地址,不用显示名。资产用对象路径(/Game/Foo/SK_Body.SK_Body),面板用 Panels.List 报出的 id,动画集合用它的名字,socket 用名字,烘焙行用 Assembly.ListCombinations 报出的下标。显示名、行号、"当前选中的那个"在改名、重排、换语言之后都会指向别的东西。

    Address by stable identity, not by display name. Assets by object path (/Game/Foo/SK_Body.SK_Body), panels by the ids Panels.List reports, animation sets by name, sockets by name, bake rows by the index Assembly.ListCombinations reports. Display names, row numbers and "whatever is selected" point at something else after a rename, a reorder or a language switch.

  3. 能试运行就先试运行。声明支持试运行的命令在 dryRun 下只报计划、不写盘,而且试运行与真跑遵循同一套规则,所以计划里的计数与增删行就是真跑会产生的那些。不支持的命令会明确拒绝,告诉你把开关去掉——不会假装做了一个计划。

    Dry-run first where it exists. A command that declares dry-run support reports a plan and writes nothing, and the dry run follows the same rules as the real run, so the counts and added/removed rows in that plan are the ones the write produces. A command without support refuses the flag outright rather than faking a plan.

  4. 按 code 分支,不看 ok。NoChange 的 ok 是真(请求合法、无事可做),Partial 的 ok 是假(一部分成了)。只读 ok 会把这两件事都判错。

    Branch on code, not on ok. NoChange has ok true (valid request, nothing to do) and Partial has it false (some of it landed). Reading ok alone gets both wrong.

  5. 用回读命令代替问人。这些命令只读,可以随便调:Panels.Snapshot、MeshPrep.GetAnimSets、MeshPrep.ValidateAnimSets、SpritePrep.ListNotifies、Skeleton.Sockets、SkelMerge.RefSkeletons、Assembly.ReadConfig、Assembly.ListCombinations、Assembly.ValidateVersions、Assembly.GetPreviewStyle、Assembly.DescribePreview、MeshPrep.Loco.List、MeshPrep.Loco.GetDraft、MeshPrep.Jump.List、MassBattle.Loco.List、MassBattle.Loco.Evaluate、Welcome.GetState。

    Read back instead of asking a human. These are read-only and safe to call at will: Panels.Snapshot, MeshPrep.GetAnimSets, MeshPrep.ValidateAnimSets, SpritePrep.ListNotifies, Skeleton.Sockets, SkelMerge.RefSkeletons, Assembly.ReadConfig, Assembly.ListCombinations, Assembly.ValidateVersions, Assembly.GetPreviewStyle, Assembly.DescribePreview, MeshPrep.Loco.List, MeshPrep.Loco.GetDraft, MeshPrep.Jump.List, MassBattle.Loco.List, MassBattle.Loco.Evaluate, Welcome.GetState.

  6. 要截图就先开面板。Panels.Open {"panel":"..."} 只负责把页签弄出来,不改变任何资产;已经开着就什么都不做。Panels.Snapshot 里的 Creator 状态只在那个面板开着时才附带,所以要先开再读。

    Open the panel before a screenshot. Panels.Open {"panel":"..."} only brings a tab up and changes no asset; an open tab is left alone. Creator's state is only attached to Panels.Snapshot while that panel is open, so open it first if you need that read.

  7. 有些状态只活在面板里。MeshPrep.Load 与 SpritePrep.Load 不收资产路径——它们重载的是打开着的那张面板;MeshPrep.Preview.* 也一样,预览 Actor 属于面板。这类命令在面板关着时回 Refused 并说明要先 Panels.Open,不会替你开窗。

    Some state only lives in a panel. MeshPrep.Load and SpritePrep.Load take no asset path — they reload the panel that is open; so does everything under MeshPrep.Preview.*, whose preview actor belongs to the panel. With no panel open these answer Refused and say to Panels.Open first; they never spawn a window for you.

  8. 重跑要落到同一个结果。能做成幂等的命令都做了:Skeleton.AddSocket 默认先删同名 socket 再建,重复跑还是恰好一个;SpritePrep.SetNotify 添加一条已经存在的行算成功且不写盘;Assembly.RollCombination 不给种子时由风格类型名推导种子,同一张卡每次掷出同一个样本;已经达标的动作回 NoChange 而不是又写一遍。

    A second run should land the same place. Commands that can be idempotent are: Skeleton.AddSocket removes a same-named socket before creating it, so a re-run leaves exactly one; SpritePrep.SetNotify treats adding a row that is already there as a success that writes nothing; Assembly.RollCombination derives its seed from the card name when you do not supply one, so the same card rolls the same sample; an action already satisfied answers NoChange instead of writing again.

  9. 被拒时读原因,不要换个姿势重试。message 会点名具体是哪一处不合格——路径没载入成网格、骨架里没有这根骨、某条选择器命中不到任何组合——很多命令还把更细的原因放在 data.error 里。把原因修掉再调,比换参数瞎试便宜得多。

    Read the refusal; do not re-shape the call and retry. message names the exact thing that does not qualify — a path that did not load as a mesh, a bone the skeleton does not have, a selector rule matching no combination — and many commands put the finer reason in data.error. Fixing that is far cheaper than guessing at arguments.

配方一:查一个单位的动画集合,改掉一个片段位 Recipe 1: Inspect One Unit's Animation Set and Fix One Clip

场景:某个单位跑步时播错了片段,你要在不动其他任何东西的前提下把它换掉。这条路线全程只用命令,不用点开面板。

The case: one unit plays the wrong clip when running and you want to replace exactly that, touching nothing else. The whole route is commands — no panel click required.

  1. 先读整张表。回报里 data.sets[] 每个集合带 name、selector 和 buckets;buckets 的键是小写的 idle / move / fall / appear / attack / hit / death / other,值是片段路径的数组。找到装着错片段的那一个集合、那一个桶、那一条。

    Read the whole table first. data.sets[] gives each set's name, selector and buckets; the bucket keys are lower-case idle, move, fall, appear, attack, hit, death, other, and each value is an array of clip paths. Find the set, bucket and entry that hold the wrong clip.

    MassBattle.Mcp.Invoke MeshPrep.GetAnimSets {"asset":"/Game/MassBattle/Demo/ATT_Hero.ATT_Hero"}

  2. 把整张表交回去,只改那一条,先试运行。mode 用默认的 replace,意思是"这张表就是结果"。务必把读到的所有集合、所有桶原样带上——漏掉的部分会被写成空。试运行报出新增与丢弃的片段行、集合计数,什么都不写。

    Hand the whole table back with only that one entry changed, as a dry run. Leave mode at its default replace, meaning "this table is the result". Carry back every set and every bucket you read — anything you leave out is written as empty. The dry run reports the clip rows added and dropped plus the set counts, and writes nothing.

    MassBattle.Mcp.Invoke MeshPrep.SetAnimSets {"asset":"/Game/MassBattle/Demo/ATT_Hero.ATT_Hero","sets":<the array GetAnimSets reported, one entry edited>,"mode":"replace","dryRun":true}

    这一步最容易被照抄坏:replace 写的就是你给的那张表。只发一个集合、一个桶,资产上其余的集合与桶就没了。正确做法是把 GetAnimSets 报出的 sets 原样交回,只动要改的那一条。

    This is the step that breaks when copied blindly: replace writes exactly the table you send. Send one set and one bucket and every other set and bucket is gone. Hand back the sets array GetAnimSets reported, changing only the one entry.

  3. 确认计划没问题,去掉 dryRun 再跑一次。回报的 outputs 是这份动画资产,data.dryRun 为 false,说明真的写盘了。

    Once the plan looks right, run it again without dryRun. outputs names the animation asset and data.dryRun is false, confirming the write reached the disk.

    MassBattle.Mcp.Invoke MeshPrep.SetAnimSets {"asset":"/Game/MassBattle/Demo/ATT_Hero.ATT_Hero","sets":<the same array>,"mode":"replace"}

  4. 用烘焙自己的规则验收。这条命令把每个集合的选择器对一个模板的组合跑一遍,逐组合给出每个桶由哪个集合供给、片段数多少,并把全部错误列在 data.errors[](第一条同时作为 message)。code 是 Ok 才说明烘焙会接受这张表——它检查的正是烘焙会拒绝的那些情形:重名集合、命中不到任何组合的选择器、两个集合抢同一个桶、空的 attack 桶、供给不了任何桶的集合。

    Verify with the bake's own rule. This command resolves every set's selector against a template's combinations, reports which set supplies each bucket and with how many clips, and lists every problem in data.errors[] (the first one is also the message). code is Ok only when the bake would accept the table — it checks the exact cases the bake refuses: duplicate set names, a selector matching no combination, two sets claiming one bucket, an empty attack bucket, a set that supplies nothing.

    MassBattle.Mcp.Invoke MeshPrep.ValidateAnimSets {"asset":"/Game/MassBattle/Demo/ATT_Hero.ATT_Hero","template":"/Game/MassBattle/Demo/BP_HeroTemplate.BP_HeroTemplate"}

如果错的那条恰好在 idle 或 move 桶里,还有一条更窄的路:MeshPrep.Configure 直接按资产路径改这两个桶、片段搜索路径与烘焙空间的朝向,然后存盘。它不做试运行(每次都写),适合你已经确定要写的情形。

If the wrong entry sits in the idle or move bucket, there is a narrower route: MeshPrep.Configure patches those two buckets, the clip search path and the bake-space facing for a named asset, then saves. It has no dry run (it always writes), so use it once you know the write is what you want.

配方二:给一张网格跑图集烘焙,并核对产物 Recipe 2: Bake an Atlas for One Mesh and Verify the Outputs

场景:一张多材质槽的网格要合并成一个槽、一张图集。这条路线先扫、再试运行、再真烘,最后按资产路径核对,不读日志。

The case: a multi-slot mesh is to become one slot and one atlas. Scan first, dry-run second, bake third, then verify by asset path — no log reading.

  1. 扫一下范围。只读,报出范围内每张网格的槽与可合并状态。范围可以给 assets(显式对象路径)或 folder(整个内容目录递归),两者也可同时给。

    Scan the scope. Read-only; reports each mesh's slots and mergeability. The scope is assets (explicit object paths) or folder (a content folder, scanned recursively), and both may be given together.

    MassBattle.Mcp.Invoke SlotMerge.Scan {"assets":["/Game/MassBattle/Units/SK_Body.SK_Body"]}

  2. 试运行,看每张网格能不能烘。第三条 token 是开关,dryRun 放在这里。回报里 data.plans[] 逐网格给出计划,data.dryRun 为真。atlasSize 默认 1024;纯色槽 512 就够,非 2 的幂也能烘。

    Dry run, one row per mesh. The third token carries the flags, and dryRun goes there. data.plans[] holds one plan per mesh and data.dryRun is true. atlasSize defaults to 1024; 512 is plenty for flat-colour slots, and a size that is not a power of two still bakes.

    MassBattle.Mcp.Invoke SlotMerge.BakeAtlas {"assets":["/Game/MassBattle/Units/SK_Body.SK_Body"],"atlasSize":1024,"maskedMode":"off"} {"dryRun":true}

  3. 真烘:同样的参数,去掉开关那一段。回报的 data 里有:touched(写出的网格数)、texturesWritten、slotsCollapsed、written(逐条产物路径)、meshes(逐网格的混合模式、是否不透明回退、有没有透明图集)、failures(逐网格的失败原因)。outputs 是这一轮真正落盘的资产。

    Bake for real: same arguments, drop the flags token. The payload carries touched (meshes written), texturesWritten, slotsCollapsed, written (each output path), meshes (per-mesh blend mode, whether it was an opaque fallback, whether an opacity atlas was written) and failures (per-mesh reason). outputs holds what actually reached the disk.

    MassBattle.Mcp.Invoke SlotMerge.BakeAtlas {"assets":["/Game/MassBattle/Units/SK_Body.SK_Body"],"atlasSize":1024,"maskedMode":"off"}

  4. 验收四条。① code 是 Ok;Partial 说明一部分成了,逐项码要去看。② data.written 非空,且与 outputs 是同一批路径。③ data.meshes 逐条说明写出的每张网格(混合模式、是否不透明回退、有没有透明图集),拿它核对"我想烘的那张确实写了";written 里同时还含图集贴图与那份逐网格材质副本,所以它的条数比网格数多。④ 若某个网格出现在 data.failures 里,reason 就是它被拒的原因——照着修,不要重试。

    Four assertions. ① code is Ok; Partial means some of it landed and the per-item codes need reading. ② data.written is non-empty and holds the same paths as outputs. ③ data.meshes describes each written mesh (blend mode, whether it was an opaque fallback, whether an opacity atlas was written) — use it to confirm the mesh you meant was the one written; written also contains the atlas textures and the per-mesh material copy, so it lists more entries than there are meshes. ④ A mesh listed in data.failures carries its reason — fix that, do not retry unchanged.

遮罩网格要选策略。maskedMode 默认 off,遮罩网格一律被拒;opaque 把材质链克隆成不透明再烘,镂空会被丢掉(data.meshes[].opaqueFallback 会如实说);on 是实验路径,不建议在正式资产上用。想保住镂空又不编译遮罩排列,用 probe。

Masked meshes need a policy. maskedMode defaults to off, which refuses every masked mesh; opaque clones the chain as Opaque and bakes that, knowingly dropping the cutout (data.meshes[].opaqueFallback says so); on is an experimental path and not for shipping assets. To keep the cutout without compiling a masked permutation, use probe.

配方三:扫一个目录,按组合并,并报出改了什么 Recipe 3: Sweep a Folder, Merge by Group, Report What Changed

场景:一个目录里躺着几十张部件网格,要按子目录分组合成几份,并且要能说清"哪一组写到了哪个资产、哪一组被拒了"。groupBy 决定怎么分组:single 全部算一组、subfolder 按每个网格所在子目录的叶名分、prefix 按名字第一个下划线前的部分分。

The case: a folder holds dozens of part meshes that should become a few merged assets, grouped by something, and you need to say which group wrote which asset and which group was refused. groupBy decides the split: single is one group, subfolder groups by the leaf of each mesh's folder, prefix by the mesh name up to its first underscore.

  1. 扫描,看每组能不能合。只读。data.groups[] 逐组给出 key、inputs、mergeable、refusal、lodCount、totalSlots、unionBones。任何一组不可合并,顶层 code 就是 Refused,message 是第一条拒绝原因。

    Scan to see whether each group can merge. Read-only. data.groups[] gives each group's key, inputs, mergeable, refusal, lodCount, totalSlots and unionBones. If any group cannot merge the top-level code is Refused and message is the first refusal.

    MassBattle.Mcp.Invoke SkelMerge.Scan {"folder":"/Game/MassBattle/Units","groupBy":"subfolder"}

  2. 试运行,拿到与真跑同一份逐组结论。试运行的载荷就是扫描那一份外加 data.dryRun=true;它不写任何资产。boneSpace 决定合并建在哪个骨骼空间里:union(默认,至少一个源带的骨)或 fullRig(整副骨架)。

    Dry run, and you get the same per-group verdict the real run would give. The payload is the scan's plus data.dryRun=true; nothing is written. boneSpace decides the space the merge is built in: union (the default — bones at least one source carries) or fullRig (the skeleton's whole rig).

    MassBattle.Mcp.Invoke SkelMerge.Apply {"folder":"/Game/MassBattle/Units","groupBy":"subfolder","dryRun":true}

  3. 真合并。每组写出一个资产,默认命名是 <组键>_MeshMerged,放在该组第一个源所在的目录;outputDir 可以改落点。data.groups[] 逐组给出 ok、code、assetPath、vertices、triangles、slots,data.failed 是失败组数,outputs 是写出的资产。

    Merge for real. Each group writes one asset, named <groupKey>_MeshMerged beside its first source by default; outputDir moves it. data.groups[] gives each group's ok, code, assetPath, vertices, triangles and slots; data.failed counts failed groups and outputs lists what was written.

    MassBattle.Mcp.Invoke SkelMerge.Apply {"folder":"/Game/MassBattle/Units","groupBy":"subfolder"}

  4. 把"改了什么"写成一张表。逐组打印 key → assetPath 加 code,就是这份变更清单;失败组再带上它自己的 message。注意顶层的码:全部成功是 Ok,一部分写出是 Partial,一组都没写成时要么 Refused(全被守卫拒)要么 Failed(合并本身失败)。

    Turn "what changed" into a table. Print key → assetPath plus code per group and that is your change list; a failed group adds its own message. Watch the top-level code: Ok when all groups landed, Partial when some did, and with nothing written either Refused (every group was guarded) or Failed (the merges themselves failed).

重跑前想清楚要不要吃进上一次的产物。目录扫描默认跳过名字像上一次产物的资产(_Merged / _MeshMerged),所以重跑不会把上一次的结果再合一遍;显式用 assets 点名的资产一律保留。overwriteExisting 决定同名的产物是被替换还是另写一份 _1——被替换的那份会失去所有指向它的引用。

Decide whether a re-run should eat the previous output. A folder scan skips assets named like an earlier output (_Merged / _MeshMerged) by default, so a re-run does not merge its own result again; assets named explicitly via assets are always kept. overwriteExisting decides whether a same-named output is replaced or a _1 copy is written beside it — a replaced asset loses every reference that pointed at it.

这里有一个真实的缺口,别被"升级整目录"这个说法骗了。能一次吃下一个目录的只有 SlotMerge.* 与 SkelMerge.*。动画集合、移动曲线、跳跃片段、socket 这些改写是一份资产一次调用的;没有一条命令能列出某个目录里有哪些资产,也没有 Content.* 这一族命令。旧的动画数据在资产被打开时由编辑器自己搬一次(见迁移指南Upgrade guide),不需要你逐份调命令。

There is a real gap here, so do not read this recipe as "upgrade a whole folder". Only SlotMerge.* and SkelMerge.* take a folder in one call. Rewrites of animation sets, locomotion curves, jump clips and sockets are one asset per call; no command lists what a folder contains, and there is no Content.* family. Legacy animation data is carried over once by the editor when an asset loads (see the migration guide), so you do not call per-asset commands for that.

命令地图:谁管什么 Command Map: Which Family Owns What

按命令 id 的第一段分组。找一条命令时先想"这是哪个工具的活",再去那一行里看动词;完整的参数清单以 MassBattle.Mcp.List 的输出为准。

Grouped by the first segment of the command id. To find a command, decide which tool owns the job and read that row's verbs; the authoritative argument list is the output of MassBattle.Mcp.List.

族Family 覆盖什么What It Covers
Panels.* 列出、打开、关闭、快照每个面板的页签状态;Creator 开着时快照附带它的资产名、输出目录与上次烘出的网格。不管资产。List, open, close and snapshot each panel's tab state; while Creator is open its snapshot adds that panel's asset name, output folder and last baked mesh. Touches no asset.
MeshPrep.* 模型源的建立与保存(NewSource / Save / Apply / Load)、按资产路径打补丁(Configure)、动画集合的读改写与校验(GetAnimSets / SetAnimSets / ValidateAnimSets)、以及面板里的动画预览(Preview.Start / Stop / SetMode / SetSpeed / Jump)。Create and save the model source (NewSource, Save, Apply, Load), patch a named asset (Configure), read, write and validate animation sets (GetAnimSets, SetAnimSets, ValidateAnimSets), and drive the panel's animation preview (Preview.Start, Stop, SetMode, SetSpeed, Jump).
SpritePrep.* 精灵图集资产的建立、保存、加载、应用到 Creator(New / Save / Load / Apply)、布局解算(Resolve)、以及逐轨道通知行的读改写(ListNotifies / SetNotify)。Create, save, load and apply the sprite atlas asset (New, Save, Load, Apply), resolve its layout (Resolve), and read or write one track's notify rows (ListNotifies, SetNotify).
Assembly.* 模板的建立与配置读写(CreateTemplate / WriteConfig / ReadConfig)、逐版本烘焙就绪度审计(ValidateVersions)、风格类型按烘焙行列出(ListCombinations)与重名修复(MakeNamesUnique)、预览的绑定与应用(LoadTemplate / ApplyCombination / RollCombination)、预览读回(GetPreviewStyle / PreviewStyle / DescribePreview)。Create a template and read or write its config (CreateTemplate, WriteConfig, ReadConfig), audit every version for bake-readiness (ValidateVersions), list style types in bake-row order (ListCombinations) and repair duplicate names (MakeNamesUnique), bind and apply a preview (LoadTemplate, ApplyCombination, RollCombination), and read the preview back (GetPreviewStyle, PreviewStyle, DescribePreview).
SlotMerge.* 槽扫描(Scan)与图集烘焙(BakeAtlas)。两个都接受目录或显式资产列表。Slot scan (Scan) and atlas bake (BakeAtlas). Both take a folder, an explicit asset list, or both.
SkelMerge.* 分组扫描(Scan)、分组合并(Apply)、逐网格参考骨架探针(RefSkeletons,报出骨数、LOD 数、槽数与前几根骨名)。Group scan (Scan), grouped merge (Apply), and a per-mesh reference-skeleton probe (RefSkeletons — bone count, LOD count, slot count and the leading bone names).
Skeleton.* 骨架 socket:读全部(Sockets)、加一个可反复加的(AddSocket)、按名字删(RemoveSocket)。骨名不存在会被拒绝而不是写进一个永远解析不出的 socket。Skeleton sockets: read them all (Sockets), add one idempotently (AddSocket), remove by name (RemoveSocket). A bone that does not exist is refused instead of writing a socket that can never resolve.
LOD.* 对着一份 LOD 标准扫描网格(Scan),把偏差行推平(Apply,可选从 LOD0 重建静态网格的阶梯)。Scan meshes against one LOD profile (Scan) and push the drifting rows onto it (Apply, optionally rebuilding a static mesh's ladder from LOD0).
MaterialMerge.* 按母材质分组并使父级合并计划(Analyze),再重挂父级、建缺的、收掉多余的实例(Apply)。Group materials by parent and build a merge plan (Analyze), then reparent, create what is missing and collapse redundant instances (Apply).
BatchRename.* 前缀 / 查找替换 / 后缀的改名计划与执行(Scan / Apply),可按资产种类过滤、可区分大小写。Plan and apply a prefix / find-replace / suffix rename (Scan, Apply), with a kind filter and optional case-sensitive matching.
Creator.* Standard 无头烘焙(BakeStandard)、Advanced 无头烘焙(BakeComposite)、以及只用于观察的 Niagara 网格 LOD 强制(SetMeshLOD)。The headless Standard bake (BakeStandard), the headless Advanced bake (BakeComposite), and a Niagara mesh-LOD override meant for inspection (SetMeshLOD).
Import.* FBX 导入(Import.Fbx):网格与动画 take、骨架绑定、命名规则、替换策略,带试运行。FBX import (Import.Fbx): mesh and animation takes, skeleton binding, a naming rule and an explicit replace policy, with a dry run.
Asset.* 把一个资产复制成新包并把引用重定向到副本(Asset.Duplicate)。Copy one asset into a new package with references retargeted to the copy (Asset.Duplicate).
Material.* 读材质函数的输入输出引脚(DescribeFunctionPins);建一张全新的精灵母材质(BuildSpriteMaster,只写新资产,遇到已存在的包直接拒绝)。Read a material function's input and output pins (DescribeFunctionPins) and build a fresh sprite master (BuildSpriteMaster — writes a new asset only and refuses an existing package).
ATT.* 测量原型(ProbeRuntimeBake):采样与打包一段动画要多少毫秒、产物多大。不写盘、不保存。A measurement probe (ProbeRuntimeBake): how many milliseconds sampling and packing one clip's animation costs, and how big the result is. Writes and saves nothing.
MassBattle.Loco.* 读一个单位配置里烘好的移动采样表并按速度求值(List / Evaluate)。这条曲线在 ATT 上的作者面在 MeshPrep.Loco.*(列出、指片段、增删改键、三档预设)与 MeshPrep.Jump.*(起跳 / 下落 / 落地三个片段)。Read the baked locomotion sample table of one agent config and evaluate it at a speed (List, Evaluate). The authoring face of that curve lives on the ATT under MeshPrep.Loco.* (list, point clips, add/edit/remove keys, a three-band preset) and MeshPrep.Jump.* (takeoff, falling, landing clips).
Welcome.* 欢迎窗口的状态、显示、评价页、迁移指南入口与"本版已看过"记档(GetState / Show / OpenRatePage / OpenMigrationGuide / Dismiss)。The welcome window's state, showing it, the rating page, the migration guide, and recording a version as seen (GetState, Show, OpenRatePage, OpenMigrationGuide, Dismiss).
Content.* 这一版没有这一族命令。目录级的批量工作由 SlotMerge.* 与 SkelMerge.* 承担;其余改写是一份资产一次调用。别照着这个前缀去猜 id。This build has no such family. Folder-wide batch work is carried by SlotMerge.* and SkelMerge.*; every other rewrite is one asset per call. Do not guess ids under this prefix.

还不能用命令做的事 What You Still Cannot Command

下面这些是对着命令清单核过的缺口:不是"文档忘了写",而是当前这一版真的没有对应的 id。遇到它们,做法是人在面板里做,或者用表里给的替代命令。

These gaps were checked against the command list itself: they are not missing documentation, they are ids this build does not register. Handle them by hand in the panel, or with the substitute named in the table.

缺口Gap 替代做法What To Do Instead
没有列出目录内容的命令No command lists what a folder contains 目录范围只存在于接受 folder 的那几条命令里(SlotMerge.Scan / BakeAtlas、SkelMerge.Scan / Apply)。需要逐份处理时,资产路径得由你自己提供。Folder scope exists only where a command takes folder (SlotMerge.Scan / BakeAtlas, SkelMerge.Scan / Apply). When you need per-asset work, you supply the asset paths yourself.
Creator 面板的 Generate 按钮没有同名命令The Creator panel's Generate button has no same-named command 无头烘焙的入口是 Creator.BakeStandard 与 Creator.BakeComposite:前者从一张网格出发,后者从模板与 clip 源出发。The headless bake entries are Creator.BakeStandard (from a mesh) and Creator.BakeComposite (from a template plus a clip source).
Assembly 面板"保存工作副本"没有命令The Assembly panel's "save the working copy" has no command 资产侧由 Assembly.WriteConfig 全量写入(配置可以从 ReadConfig 回读后改)。注意:打开着的面板会一直持有它自己的工作副本,直到被重新绑定。The asset side is written whole by Assembly.WriteConfig (read it back with ReadConfig, edit, write). Note that an open panel keeps its own working copy until it is re-bound.
MeshPrep.Load / SpritePrep.Load 只能作用于打开着的面板MeshPrep.Load / SpritePrep.Load only act on an open panel 它们没有资产路径参数,因为要重载的就是面板当前绑着的那份。要按路径操作,用 MeshPrep.Configure(改)或 MeshPrep.GetAnimSets(读)。They take no asset path because what they reload is the asset the panel holds. To work by path, use MeshPrep.Configure (write) or MeshPrep.GetAnimSets (read).
调试器(Debugger)没有命令The Debugger has no commands 只能 Panels.Open {"panel":"Debugger"} 把它打开,里面的读数是给人看的。You can only bring it up with Panels.Open {"panel":"Debugger"}; its readouts are for human eyes.
批量命令没有取消按钮Batch commands have no Cancel 它们一次跑完再回来。跑之前先用试运行把范围与逐项结论看一遍,比跑到一半想停便宜得多。They run to completion and return. Dry-running the scope first is far cheaper than wanting to stop halfway.

面板能做的事,这一页没有列出的,按同一套思路去找:动作名 → 面板名 → 命令 id。找到之后先用只读的那条验证地址对不对,再用试运行验证计划,最后才真写;找不到 id 就说明那件事确实还只能在面板里做,见上表。面板怎么用、每个工具的输入输出是什么,看Mesh Prep 与其他工具小节;整体能力清单见功能总览Feature overview。

For anything a panel does that this page does not list, follow the same path: action → panel → command id. Once you have it, verify the address with the read-only command, verify the plan with a dry run, and only then write. If there is no id, that action really is panel-only — see the table above. For how the panels are used and what each tool takes and returns, see Mesh Prep and the other tool sections; the overall capability list is in the feature overview.