unity-component

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

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/Dylan8865/FinalYearProject --skill unity-component-dylan8865
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: unity-component
Source: https://github.com/Dylan8865/FinalYearProject/tree/main/GameDev/Tester/.agents/skills/unity-skills/skills/component
Command: npx skills add https://github.com/Dylan8865/FinalYearProject --skill unity-component-dylan8865

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity components manually through the Inspector is slow and repetitive, especially when applying the same changes across many GameObjects. This Skill lets you add, remove, copy, toggle, and read or write component fields programmatically, including batch operations that reduce many API calls to one. ## Core Features & Use Cases - Component Lifecycle Management: Add, remove, list, and copy components between GameObjects, with exact serialized-field verification via component_copy_exact. - Property Reading and Writing: Read component properties and fields, set basic values, vectors, colors, enums, scene references, and asset references, including Inspector SerializedProperty paths. - Batch Operations: Use component_add_batch, component_remove_batch, and component_set_property_batch to modify many objects in a single call. - Use Case: Attach a Rigidbody to three enemy objects and set each mass to 2.0 using just two batch calls instead of six individual calls. ## Quick Start Ask the assistant to 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 programmatically?▼

Use component_add with the target GameObject identified by name, instanceId, or hierarchy path, plus the componentType such as Rigidbody or BoxCollider. For multiple objects, component_add_batch performs 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. Values support primitives, vectors as x/y/z objects, colors as r/g/b/a, enums as strings, and scene or asset references via referencePath or assetPath.

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

Yes, component_copy duplicates a component between a source and target GameObject. component_copy_exact additionally verifies that serialized Inspector fields match and reports any mismatches.

Why does component_add fail with a wrong component type name?▼

The componentType parameter is case-sensitive, so Rigidbody works but rigidbody does not. Custom scripts require the exact class name, and namespaced scripts need the full form like Namespace.ClassName.

How do I edit Unity Inspector serialized fields that are not public properties?▼

Use component_get_serialized_properties to list Inspector SerializedProperty paths, then component_set_serialized_property with the propertyPath, for example items.Array.data[0], to write the value.

When should I use batch component operations instead of single calls?▼

Use batch skills whenever operating on two or more objects. component_add_batch, component_remove_batch, and component_set_property_batch reduce N API calls to one, which is significantly more efficient for scene-wide changes.