Create Sprite Node
cocos_local_create_sprite_nodeCreates or ensures a sprite node in a Cocos Creator scene by attaching a Sprite component and assigning a specified SpriteFrame asset, optionally saving the scene.
Instructions
Ensure a scene node exists, attach a Sprite component, resolve a SpriteFrame asset, assign it, and optionally save the scene.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | ||
| sprite | Yes | ||
| openScene | No | ||
| saveScene | No | ||
| scenePath | No | assets/scenes/Main.scene | |
| timeoutMs | No | ||
| projectRoot | Yes | ||
| openSceneDelayMs | No |