cocos_upgrade_image_meta
Convert PNG texture metadata to sprite-frame format for Cocos Creator, enabling image use in Sprite components without manual editing.
Instructions
Upgrade a texture-only PNG meta to include a sprite-frame sub.
Cocos Creator's CLI --build auto-generates type: texture metas
when it imports a fresh PNG. To reference such a PNG from
cc.Sprite, run this tool to add the f9941 (sprite-frame) sub.
Idempotent — does nothing if the sub already exists.
Returns the updated meta dict.
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": {
"meta_path": "<meta_path>"
},
"name": "cocos_upgrade_image_meta"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta_path | Yes |