cocos_add_component
Attach components to Cocos Creator nodes by specifying type names and properties, enabling game development automation without manual coding.
Instructions
Attach any cc component by its full type name (e.g. 'cc.RigidBody2D').
props values are auto-wrapped: list[3]->Vec3, int->id ref, etc.
For resource refs pass {"uuid": ""}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scene_path | Yes | ||
| node_id | Yes | ||
| type_name | Yes | ||
| props | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |