editor-selection-set

Sets the Unity Editor selection to specified objects via ObjectRef instance IDs.

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/PMK95/GridSquad --skill editor-selection-set-pmk95
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: editor-selection-set
Source: https://github.com/PMK95/GridSquad/tree/main/GridSquadUnity/.agents/skills/editor-selection-set
Command: npx skills add https://github.com/PMK95/GridSquad --skill editor-selection-set-pmk95

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? Automating Unity Editor workflows often requires programmatically changing which objects are selected in the Hierarchy or Inspector, which is tedious to do manually when driving the editor through an MCP CLI. ## Core Features & Use Cases - Programmatic Selection: Assigns an array of resolved ObjectRefs to Selection.objects in the Unity Editor. - Validation Before Mutation: Every ObjectRef must resolve via FindObject(), otherwise the call throws before touching the current selection. - UI Refresh and Snapshot: Repaints all editor views and returns a SelectionData snapshot including GameObjects, Transforms, instance IDs, and asset GUIDs. - Use Case: After locating a set of GameObjects by instance ID, select them all at once so subsequent editor operations or inspections target exactly those objects. ## Quick Start Ask the AI to set the Unity Editor selection to the objects with the given instance IDs using the editor-selection-set tool, after checking the current selection with editor-selection-get.

Frequently Asked Questions about editor-selection-set

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

FAQPage Schema
How do I set the Unity Editor selection programmatically?▼

Call the editor-selection-set tool with a select array of ObjectRefs containing instance IDs. The tool assigns the resolved objects to Selection.objects and repaints all editor views so the Hierarchy and Inspector update.

How do I check the current Unity Editor selection before changing it?▼

Use the editor-selection-get tool first to inspect the current selection. It returns the SelectionData snapshot, letting you confirm state before passing new ObjectRefs to editor-selection-set.

What happens if an ObjectRef does not resolve to a Unity object?▼

The call throws an error before modifying Selection.objects. Every entry in the select array must resolve via FindObject(), so invalid instance IDs abort the entire operation safely.

What does the editor-selection-set tool return?▼

It returns a SelectionData snapshot of the post-change selection, including selected GameObjects, top-level Transforms, instance IDs, asset GUIDs, and the active object shown in the Inspector.

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

The CLI is not installed globally. Install it with npm install -g unity-mcp-cli or invoke it via npx unity-mcp-cli, and check the unity-initial-setup skill for detailed installation steps.