gameobject-component-add
Add components to GameObjects in Unity scenes or prefabs by specifying component type names and target object references.
Instructions
Add Component to GameObject in opened Prefab or in a Scene. Use 'gameobject-find' tool to find the target GameObject first. Use 'gameobject-component-list-all' tool to find the component type names to add.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| componentNames | Yes | Array of component type names to add. Example: ["BoxCollider","Rigidbody"] | |
| gameObjectRef | Yes | Target GameObject. SCHEMA: {"name":"ObjectName"} or {"instanceID":12345} or {"path":"hierarchy/path"} |