unity-component

Manage GameObject components in Unity scenes including adding, removing, copying, and editing properties.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-component-ethanjpope
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-component
Source: https://github.com/ethanJPope/Our-Main-Hackathon-Game/tree/main/.agents/skills/unity-skills/skills/component
Command: npx skills add https://github.com/ethanJPope/Our-Main-Hackathon-Game --skill unity-component-ethanjpope

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity GameObject components through an AI assistant requires precise knowledge of component types, property names, and serialized field paths, and mistakes like wrong casing or nonexistent skill names cause failed calls. This Skill provides the exact operational reference for adding, removing, copying, toggling, and reading or writing component properties on scene objects. ## Core Features & Use Cases - Component Lifecycle Management: Add, remove, list, and copy components between GameObjects, with batch variants that collapse N operations into a single API call. - Property Read/Write: Set C# properties, Inspector serialized fields, and enable/disable flags, with support for primitives, vectors, colors, enums, scene references, and asset references. - Use Case: When setting up physics on multiple objects, use component_add_batch to attach Rigidbody to several enemies at once, then component_set_property_batch to configure mass on all of them in two calls instead of six. ## Quick Start Ask the assistant to add a Rigidbody component to the GameObject named Player and set its mass to 2.5 using the unity component skills.

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 object 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 API call.

How to set a component property like Rigidbody mass in Unity?

Use component_set_property with the componentType, the C# property name such as mass, and a value. Vectors and colors are passed as comma-separated strings, enums by member name, and asset or scene references via assetPath, referencePath, or referenceName.

Why does setting m_IsKinematic fail with property not found?

The m_-prefixed names are Unity serialized backing fields, not C# API names. component_set_property expects names like isKinematic, while m_-prefixed paths only work with component_set_serialized_property, which takes the propertyPath verbatim.

Is the Unity component type name case-sensitive?

Yes, componentType is case-sensitive, so Rigidbody works but rigidbody fails. Custom scripts require the exact class name, and namespaced scripts need the full form such as MyNamespace.MyScript.

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

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, and component_set_property_batch each accept a JSON array of per-item objects and return per-item results.

Why does component_remove return MODE_FORBIDDEN?

component_remove and component_remove_batch are flagged NeverInSemi because they perform deletions, so they are blocked in Approval and Auto modes. They only execute in Bypass mode or when the call matches an allowlist entry.