cocos_wait_for_preview
Pauses execution after building to ensure assets load before capturing screenshots in Cocos Creator automated workflows.
Instructions
Navigate, sleep ms, close — useful between a build and
a screenshot to let async asset loading finish.
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": {
"url": "<url>"
},
"name": "cocos_wait_for_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| ms | No | ||
| viewport_width | No | ||
| viewport_height | No | ||
| timeout_ms | No |