unity_component_add
Add a built-in or custom script component to a Unity GameObject by specifying its path and the component type.
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 |
|---|---|---|---|
| port | No | Unity instance port (from unity_select_instance). Always include it when multiple instances run. | |
| componentType | Yes | Full type name, e.g. 'Rigidbody', 'BoxCollider', 'MyNamespace.MyScript' | |
| gameObjectPath | Yes | Path or name of the target GameObject |