cocos_add_image
Add PNG images to Cocos Creator projects by copying files and generating sprite-frame metadata for game development assets.
Instructions
Copy a PNG into the project and write a complete sprite-frame meta.
Default: assets/textures/. Set as_resource=True to put it under assets/resources/ (needed for runtime loading via resources.load()).
Returns {path, rel_path, main_uuid, sprite_frame_uuid, texture_uuid}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| src_png | Yes | ||
| rel_path | No | ||
| as_resource | No |