gameobject-component-add

Adds one or more Components to a GameObject in an opened Unity Prefab or active Scene.

Updated May 27, 2026
One-click install
npx skills add https://github.com/AdielMag/ClashUp --skill gameobject-component-add-adielmag
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gameobject-component-add
Source: https://github.com/AdielMag/ClashUp/tree/main/client/ClashUp.Unity/.claude/skills/gameobject-component-add
Command: npx skills add https://github.com/AdielMag/ClashUp --skill gameobject-component-add-adielmag

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Manually attaching Components to GameObjects in the Unity Editor is repetitive, especially when configuring many objects or when working through an AI assistant. This Skill adds one or more Components to a target GameObject in the opened Prefab or active Scene via the unity-mcp-cli tool, with per-item error reporting so one bad type name does not abort the whole batch. ## Core Features & Use Cases - Batch Component Addition: Add multiple Components in a single call, with successful additions returned as ComponentDataShallow snapshots. - Flexible Type Resolution: Component types are resolved by fully-qualified name (with namespace) or by bare class-name fallback against all available component types. - Resilient Error Handling: Unknown types, non-Component types, and duplicate/add failures are collected in Errors and Warnings instead of throwing. - Use Case: After locating a player character GameObject with 'gameobject-find', add a Rigidbody, CapsuleCollider, and a custom PlayerController script to it in one command, then inspect which additions succeeded. ## Quick Start Ask the AI to add a Rigidbody and a CapsuleCollider component to the GameObject named Player in the active Unity scene.

Frequently Asked Questions about gameobject-component-add

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a component to a GameObject in Unity from the command line?▼

Run unity-mcp-cli run-tool gameobject-component-add with a JSON input containing componentNames and a gameObjectRef. The tool adds the components to the GameObject in the opened Prefab or active Scene and reports successes and failures.

How do I find the GameObject before adding components?▼

Use the gameobject-find tool to locate the target GameObject first, then reference it by instanceID, hierarchy path, or name in the gameObjectRef field. You can also use gameobject-component-list-all to discover valid component type names.

Can I add multiple components to a GameObject in one call?▼

Yes, componentNames accepts a list of type names processed as a batch. Per-name errors such as unknown types or duplicates are accumulated in the response Errors and Warnings lists without aborting the remaining additions.

What component type name format does the Unity add component tool accept?▼

Each entry may be a fully-qualified type name including the namespace, which is preferred, or a bare class name resolved via fallback against all available component types. Types not assignable to UnityEngine.Component are reported as errors.

Why does unity-mcp-cli fail with command not found?▼

The CLI is not installed or not on your PATH. Install it globally with npm install -g unity-mcp-cli or invoke it via npx unity-mcp-cli, and consult the unity-initial-setup skill for detailed installation steps.