gameobject-component-get

Inspect a Unity GameObject component's type, enabled state, and serialized fields.

Updated May 20, 2026
One-click install
npx skills add https://github.com/Alltwice/Unity-3D-Project --skill gameobject-component-get-alltwice
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gameobject-component-get
Source: https://github.com/Alltwice/Unity-3D-Project/tree/main/.agents/skills/gameobject-component-get
Command: npx skills add https://github.com/Alltwice/Unity-3D-Project --skill gameobject-component-get-alltwice

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? When working with Unity scenes through the MCP CLI, you often need to see exactly what data a component holds before modifying it. This Skill retrieves detailed information about a specific component on a GameObject, including its type, enabled state, and serialized fields and properties, without opening the Unity Editor inspector. ## Core Features & Use Cases - Component Inspection: Returns the component reference, index, type name, and enabled state for any component on a GameObject. - Serialized Data Reads: Optionally populates full field and property lists, with deep serialization for nested objects. - Token-Saving Scoped Reads: Use paths or viewQuery to read only specific fields, array elements, or filtered subtrees instead of the entire component. - Use Case: Before updating a Rigidbody's mass via a modify tool, inspect the component first to confirm its current values and verify you are targeting the correct component index. ## Quick Start Ask the AI to get the details of component index 0 on the GameObject named Player, reading only the fields you need via the paths parameter.

Frequently Asked Questions about gameobject-component-get

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get component data from a Unity GameObject?▼

Run the gameobject-component-get tool with a gameObjectRef and componentRef. The component can be matched by index or instance ID, and the response includes its type name, enabled state, and optionally serialized fields and properties.

How to read only specific fields of a Unity component?▼

Supply the paths parameter with a list of field paths like 'fieldName', 'nested/field', or 'arrayField/[i]'. Alternatively use viewQuery to filter by name regex, max depth, or type. Both return results in the View field and skip the legacy lists.

What is the difference between paths and viewQuery parameters?▼

The paths parameter reads individually listed field paths via Reflector.TryReadAt, while viewQuery navigates to a subtree and filters by name regex, max depth, or type via Reflector.View. They are mutually exclusive, so supply at most one.

How do I find which components a GameObject has first?▼

Use the gameobject-find tool to list all components on the GameObject before calling this tool. That gives you the component index or instance ID needed for the componentRef parameter.

Why is unity-mcp-cli not found when running the tool?▼

The CLI must be installed globally with npm install -g unity-mcp-cli, or invoked through npx unity-mcp-cli. The unity-initial-setup skill contains detailed installation instructions.