fgui_import_image
Imports an image from an absolute local path into a FairyGUI package, with conflict handling, optional downscaling to a max long-edge size, and post-save verification.
Instructions
从绝对本地路径导入图片;这是磁盘写入操作,支持拒绝、自动改名或替换同名图片。
max_size 是长边上限(像素,1~32768):源图长边超过它就先等比缩放再入库,响应里的 scaled 回报缩放前后尺寸与缩放比,atlasPrecheck 给出按真实图集约束的前置判定(fit 为 fits/exceeds/unknown,unknown 不等于放行)。
save=True 保存包与工程后默认比对 package.xml(分支写入比对 package_branch.xml)条目和资源文件;external_reload=True(需 save=True)卸载并重新加载 asset 再比对,响应 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": {
"package_name": "<package_name>",
"source_path": "<source_path>"
},
"name": "fgui_import_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| save | No | ||
| branch | No | ||
| verify | No | ||
| exported | No | ||
| max_size | No | ||
| folder_path | No | ||
| source_path | Yes | ||
| package_name | Yes | ||
| resource_name | No | ||
| create_folders | No | ||
| conflict_policy | No | error | |
| external_reload | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||