fgui_set_instance_override
Sets extension-level overrides on FairyGUI component instances to give individual instances different titles, icons, colors, or font sizes. Saves changes and can verify persistence after reload.
Instructions
写组件实例的扩展级 override(同一个组件、不同实例不同文案/样式)。
只支持扩展级覆盖,这是编辑器与 FGUI 运行时共同支持的那一层:
源组件是 Button 扩展时可写 title(text 是别名)、icon、selectedTitle、selectedIcon、
titleColor(#RRGGBB 六位,alpha 会被编辑器丢掉)、titleFontSize;Label 扩展可写
title、icon、titleColor、titleFontSize。落盘形态是实例节点里的扩展子节点
<component ...><Button title="..."/></component>,运行时按同一组字段消费。
边界(真机 6.1.4 实测):编辑器不支持逐子对象覆盖——改实例内部子对象只改到内存, 磁盘不落盘;这类需求请改用 insert_text 直接建对象,或把样式固化成组件类型。 源组件没有扩展时也会被拒绝。
external_reload=True 会在保存后关闭并重新打开文档再比对,是唯一能证明「重新载入时值不丢」 的验证;需要 save=True。响应中的 strength 字段标明验证强度:reload / disk / none。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"properties": "<properties>"
},
"name": "fgui_set_instance_override"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | ||
| verify | No | ||
| object_id | No | ||
| properties | Yes | ||
| object_name | No | ||
| object_path | No | ||
| external_reload | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||