unity-component

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

Updated Aug 31, 2026
One-click install
npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-component-pikachu0310
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-component
Source: https://github.com/pikachu0310/codex-agent-ops-public/tree/main/.agents/skills/unity-skills/skills/component
Command: npx skills add https://github.com/pikachu0310/codex-agent-ops-public --skill unity-component-pikachu0310

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Editing Unity components manually through the Inspector is slow and error-prone when working across many GameObjects. This Skill exposes programmatic control over components so an AI agent can attach, remove, copy, toggle, and read or write component properties directly in a Unity scene. ## Core Features & Use Cases - Component Lifecycle Management: Add, remove, list, and copy components between GameObjects, with batch variants that collapse N API calls into one. - 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 dozens of level objects, use component_add_batch to attach Rigidbody to all of them and component_set_property_batch to assign mass values in two calls instead of dozens. ## Quick Start Ask the agent to add a Rigidbody component to the GameObject named Crate 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 GameObject identifier (name, instanceId, or path) and the componentType such as Rigidbody or BoxCollider. For multiple objects, component_add_batch performs all additions in a single call.

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

Use component_set_property with the componentType, propertyName, and value. Values travel as comma-separated strings for vectors and colors, and enums accept member names case-insensitively.

Why does setting m_IsKinematic fail with property not found?

component_set_property uses C# API names like isKinematic, not serialized backing field names like m_IsKinematic. The m_-prefixed paths only work with component_set_serialized_property, which expects a verbatim propertyPath.

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

Yes, component_copy duplicates a component between objects using source and target identifiers. 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 NeverInSemi because they delete data. They only run in Bypass mode or when explicitly allowlisted, returning MODE_FORBIDDEN under Approval or Auto modes.