unity_component_add
Add a component to a specified GameObject, supporting built-in types like Rigidbody and BoxCollider, as well as custom scripts.
Instructions
Add a component to a GameObject. Supports built-in types (Rigidbody, BoxCollider, AudioSource, Light, Camera, etc.) and custom scripts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gameObjectPath | Yes | Path or name of the target GameObject | |
| componentType | Yes | Full type name, e.g. 'Rigidbody', 'BoxCollider', 'MyNamespace.MyScript' | |
| port | No | Target Unity instance port for parallel-safe routing. Get this from unity_select_instance. When working with multiple Unity instances, ALWAYS include this parameter. |