cocos_set_engine_module
Enable or disable engine modules like physics-2d-box2d, spine, or dragon-bones in Cocos Creator projects. Configure required modules before using related components and rebuild after changes.
Instructions
Enable/disable an engine module (physics-2d-box2d, spine, dragon-bones, tiled-map, etc.).
IMPORTANT: You MUST enable 'physics-2d-box2d' before using RigidBody2D/Collider2D, 'spine' before using sp.Skeleton, 'dragon-bones' before DragonBones, 'tiled-map' before TiledMap. After changing modules, clean library+temp and rebuild.
Common modules: physics-2d-box2d, physics-2d-builtin, spine, dragon-bones, tiled-map, particle-2d, audio, animation, 2d, ui, graphics, mask, rich-text, tween, video, webview.
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": {
"project_path": "<project_path>",
"module_name": "<module_name>",
"enabled": "<enabled>"
},
"name": "cocos_set_engine_module"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| module_name | Yes | ||
| enabled | Yes |