unity-component

Manage Unity GameObject components including add, remove, copy, enable, and serialized property editing.

2|Updated May 18, 2026
One-click install
npx skills add https://github.com/pcone-mm/NewFPG --skill unity-component-pcone-mm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-component
Source: https://github.com/pcone-mm/NewFPG/tree/main/.agents/skills/unity-skills/skills/component
Command: npx skills add https://github.com/pcone-mm/NewFPG --skill unity-component-pcone-mm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity GameObject components through an AI assistant requires precise knowledge of component type names, property paths, and object targeting, and doing operations one object at a time wastes API calls. This Skill provides structured commands to add, remove, list, copy, enable/disable, and read or write component fields on GameObjects, with batch variants that collapse N operations into a single call. ## Core Features & Use Cases - Component Lifecycle Management: Add, remove, list, and copy components between GameObjects using name, instanceId, or hierarchy path targeting. - Property Read/Write: Set basic values, vectors, colors, enums, scene references, and asset references via component_set_property, or target exact Inspector paths with component_set_serialized_property. - Batch Operations: Use component_add_batch, component_remove_batch, and component_set_property_batch to operate on many objects in one API call. - Use Case: Attach a Rigidbody to three enemy objects and set each one's mass to 2.0 using just two batch calls instead of six individual calls. ## Quick Start Add a Rigidbody component to the GameObject named Enemy1 and set its mass property to 2.5.

Frequently Asked Questions about unity-component

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?

Use component_add with the GameObject name, instanceId, or hierarchy path plus the componentType such as Rigidbody or BoxCollider. For multiple objects, use component_add_batch with a JSON array of items to perform all additions in one call.

How do I set a component property like Rigidbody mass in Unity?

Use component_set_property with the componentType, propertyName, and value. Basic types, vectors, colors, and enums are passed as value, while scene objects use referencePath or referenceName and project assets use assetPath.

Why does component_add fail with my custom script name?

The componentType parameter is case-sensitive, so Rigidbody works but rigidbody does not. Custom scripts require the exact class name, and namespaced classes must use the full form like MyNamespace.MyScript.

Can I copy a component from one GameObject to another in Unity?

Yes, component_copy duplicates a component from a source GameObject to a target using name, instanceId, or path identifiers for both. component_copy_exact additionally verifies that serialized Inspector fields match and reports any mismatches.

Why does component_remove return MODE_FORBIDDEN?

component_remove and component_remove_batch are flagged as high-risk delete operations marked NeverInSemi. They return MODE_FORBIDDEN under Approval or Auto modes and only execute in Bypass mode or when matched by an allowlist entry.

When should I use batch component operations in Unity?

Use the batch variants whenever operating on two or more objects, since they reduce N API calls to one. component_add_batch, component_remove_batch, component_set_property_batch, and component_set_serialized_property_batch each accept a JSON array of per-item objects.