scene-set-active

Sets a specified opened Unity scene as the active scene via unity-mcp-cli.

Updated May 28, 2026
One-click install
npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill scene-set-active-ishaansingh-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: scene-set-active
Source: https://github.com/ishaansingh-ai/Mechanical-2D/tree/main/.claude/skills/scene-set-active
Command: npx skills add https://github.com/ishaansingh-ai/Mechanical-2D --skill scene-set-active-ishaansingh-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires unity-mcp-cli.

What problem does it solve? When working with multiple opened scenes in the Unity Editor, operations like adding GameObjects apply only to the active scene. This Skill lets you programmatically designate which opened scene is active, removing manual editor clicks from automated workflows. ## Core Features & Use Cases - Set Active Scene: Marks a specified opened scene as the active scene in the Unity Editor through the unity-mcp-cli tool. - Flexible Scene Reference: Accepts a scene reference by instanceID, asset path, or asset GUID. - Scene State Output: Returns shallow scene data including load state, dirty flag, build index, and root count. - Use Case: While automating a multi-scene level setup, first list opened scenes with the scene-list-opened tool, then set the target scene active before instantiating new GameObjects into it. ## Quick Start Ask the AI to set the scene at Assets/Scenes/Level1.unity as the active scene using the scene-set-active tool.

Frequently Asked Questions about scene-set-active

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

FAQPage Schema
How do I set the active scene in Unity from the command line?▼

Run unity-mcp-cli run-tool scene-set-active with a JSON input containing a sceneRef that identifies the scene by instanceID, assetPath, or assetGuid. The scene must already be opened in the Unity Editor.

How do I find which scenes are currently opened in Unity?▼

Use the scene-list-opened tool to get the list of all opened scenes. The returned scene data includes instanceID, path, and build index values you can pass as the sceneRef to scene-set-active.

What reference formats does scene-set-active accept for the scene?▼

The sceneRef accepts an AssetObjectRef with an instanceID, an assetPath starting with Assets/, or an assetGuid. Any one of these identifiers can locate the scene asset in the project.

Why does scene-set-active fail or return an invalid scene?▼

The tool fails when the referenced scene is not currently opened in the editor or the reference does not resolve to a valid scene asset. Verify the scene is open with scene-list-opened and check the IsValidScene flag in the output.

What should I do if unity-mcp-cli is not found?▼

Install it globally with npm install -g unity-mcp-cli or prefix commands with npx unity-mcp-cli. The unity-initial-setup skill contains detailed installation instructions.