batihandev/unity-mcp-skills/component

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use when users want to add, remove, or configure components like Rigidbody, Collider, AudioSource.

Install

npx vskill@latest install batihandev/unity-mcp-skills/component

SKILL.md

Unity Component Skills

Overview

BATCH-FIRST: Use *_batch skills when operating on 2+ objects to reduce API calls from N to 1.

Common Mistakes

DO NOT (common hallucinations):

  • component_create / component_get do not exist → use component_add (add) and component_get_properties (read)
  • component_find does not exist → use component_list to list components on an object
  • componentType is case-sensitive — Rigidbody not rigidbody, BoxCollider not boxcollider
  • Custom scripts need exact class name; if namespaced, use Namespace.ClassName

Routing:

  • To create a C# component script → use script module's script_create first, then component_add
  • To set multiple properties at once → use component_set_property_batch
  • To enable/disable a component → component_set_enabled (not component_set_property)
Object Targeting: All single-object skills accept name (string), instanceId (int, preferred), and path (string, hierarchy path). Provide at least one.

Skills Overview

Single ObjectBatch VersionUse Batch When
component_addcomponent_add_batchAdding to 2+ objects
component_removecomponent_remove_batchRemoving from 2+ objects
component_set_propertycomponent_set_property_batchSetting on 2+ objects

Other Skills (no batch):

  • component_list - List all components on an object
  • component_get_properties - Get component property values
  • component_set_enabled - Enable/disable a component (Behaviour, Renderer, Collider)
  • component_copy - Copy a component from one object to another

Single-Object Skills

component_add

Add a component to a GameObject.

ParameterTypeRequiredDescription
namestringNo*GameObject name
instanceIdintNo*Instance ID (preferred)
pathstringNo*Hierarchy path
componentTypestringYesComponent type name

*At least one identifier required

Returns: {success, gameObject, instanceId, component, fullTypeName}

component_remove

Remove a component from a GameObject.

ParameterTypeRequiredDescription
namestringNo*GameObject name
instanceIdintNo*Instance ID
componentTypestringYesComponent type to remove

Returns: {success, gameObject, removed}

component_list

List all components on a GameObject.

ParameterTypeRequiredDescription
namestringNo*GameObject name
instanceIdintNo*Instance ID

Returns: {gameObject, instanceId, path, componentCount, components: [{type, fullType, enabled}]}

component_set_property

Set a component property value.

ParameterTypeRequiredDescription
namestringNo*GameObject name
instanceIdintNo*Instance ID
componentTypestringYesComponent type
propertyNamestringYesProperty to set
valueanyCond.New value (for basic types, vectors, colors)
referencePathstringNoScene object hierarchy path (for scene references)
referenceNamestringNoScene object name (for scene references)
assetPathstringNoProject asset path (for asset references: Material, Texture, AudioClip, ScriptableObject, Prefab, etc.)
Provide one of: value (basic types), referencePath/referenceName (scene objects), or assetPath (project assets).

`value` type examples: See [../../recipes/component/component_set_property.md](../../recipes/component/component_set_property.md) for value format details and C# template.

Returns: {success, gameObject, component, property, valueSet, valueType}

component_get_properties

Get all properties of a component.

ParameterTypeRequiredDescription
namestringNo*GameObject name
instanceIdintNo*Instance ID
componentTypestringYesComponent type

Returns: {gameObject, component, fullTypeName, properties: [{name, type, value, canWrite}], fields: [{name, type, value, isSerializable}]}


Batch Skills

component_add_batch

Add components to multiple objects.

Returns: {success, totalItems, successCount, failCount, results: [{success, gameObject, componentType, added}]}

See [../../recipes/component/component_add_batch.md](../../recipes/component/component_add_batch.md) for C# template.

component_remove_batch

Remove components from multiple objects.

Returns: {success, totalItems, successCount, failCount, results: [{success, gameObject, componentType, removed}]}

See [../../recipes/component/component_remove_batch.md](../../recipes/component/component_remove_batch.md) for C# template.

component_set_property_batch

Set properties on multiple objects.

Returns: {success, totalItems, successCount, failCount, results: [{success, gameObject, componentType, property, oldValue, newValue}]}

See [../../recipes/component/component_set_property_batch.md](../../recipes/component/component_set_property_batch.md) for C# template.


Common Component Types

Physics
TypeDescription
RigidbodyPhysics simulation
BoxColliderBox collision
SphereColliderSphere collision
CapsuleColliderCapsule collision
MeshColliderMesh-based collision
CharacterControllerCharacter movement
Rendering
TypeDescription
MeshRendererRender meshes
SkinnedMeshRendererAnimated meshes
SpriteRenderer2D sprites
LineRendererDraw lines
TrailRendererMotion trails
Audio
TypeDescription
AudioSourcePlay sounds
AudioListenerReceive audio
UI
TypeDescription
CanvasUI container
ImageUI images
TextUI text (legacy)
ButtonClickable button

Example: Efficient Physics Setup

See [../../recipes/component/README.md](../../recipes/component/README.md) for all component recipes.

Best Practices

  1. Add colliders before Rigidbody for physics
  2. Use component_list to verify additions
  3. Check property names with component_get_properties first
  4. Some properties are read-only (will fail to set)
  5. Use full type names for custom scripts (e.g., "MyNamespace.MyScript")

Additional Skills

component_copy

Copy a component from one GameObject to another.

ParameterTypeRequiredDefaultDescription
sourceNamestringNo*nullSource GameObject name
sourceInstanceIdintNo*0Source Instance ID
sourcePathstringNo*nullSource hierarchy path
targetNamestringNo*nullTarget GameObject name
targetInstanceIdintNo*0Target Instance ID
targetPathstringNo*nullTarget hierarchy path
componentTypestringYes-Component type to copy

*At least one source identifier and one target identifier required

Returns: { success, source, target, componentType }

component_set_enabled

Enable or disable a component (Behaviour, Renderer, Collider, etc.).

ParameterTypeRequiredDefaultDescription
namestringNo*nullGameObject name
instanceIdintNo*0Instance ID
pathstringNo*nullHierarchy path
componentTypestringYes-Component type to enable/disable
enabledboolNotrueWhether to enable or disable

*At least one identifier required

Returns: { success, gameObject, componentType, enabled }


Recipe path rule: ../../recipes/component/<command>.md

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/batihandev/unity-mcp-skills/component/badge)](https://verified-skill.com/skills/batihandev/unity-mcp-skills/component)

Something wrong with this skill or its page? Tell us.