Skip to content
Development
Skill

/scene-get-data

Retrieve the list of root GameObjects in the specified opened scene (or the active scene when `openedSceneName` is empty). Supports token-saving path-scoped reads over the root-GameObjects array via `paths` or `viewQuery`. Use 'scene-list-opened' to enumerate scenes.

From plugin
ivanmurzak-unity-mcp
3.8k80 skills
Install
$ npx -y skills add IvanMurzak/Unity-MCP --skill scene-get-data --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/scene-get-data

Context preview

The summary Claude sees to decide when to auto-load this skill.

Retrieve the list of root GameObjects in the specified opened scene (or the active scene when `openedSceneName` is empty). Supports token-saving path-scoped reads over the root-GameObjects array via `paths` or `viewQuery`. Use 'scene-list-opened' to enumerate scenes.

SKILL.md

scene-get-data.SKILL.md
name: scene-get-data
description: Retrieve the list of root GameObjects in the specified opened scene (or the active scene when `openedSceneName` is empty). Supports token-saving path-scoped reads over the root-GameObjects array via `paths` or `viewQuery`. Use 'scene-list-opened' to enumerate scenes.

Scene / Get Data

This tool retrieves the list of root GameObjects in the specified scene. Use 'scene-list-opened' tool to get the list of all opened scenes.

Toggles (all default `false` to keep responses small)

  • `includeRootGameObjects` — include root GameObjects in the scene data.
  • `includeChildrenDepth` (default 3) — depth of the hierarchy to include.
  • `includeBounds` — include 3D bounds for GameObjects.
  • `includeData` — include serialized component data for GameObjects.

Path-scoped reads (token-saving)

Supply `paths` to read only the listed fields/elements from the scene's root-GameObjects array via `Reflector.TryReadAt`, or `viewQuery` to navigate/filter the same array via `Reflector.View`. The result populates `Data` on the returned `SceneData`. These two parameters are mutually exclusive.

Path syntax

`fieldName`, `nested/field`, `arrayField/[i]`, `dictField/[key]`. Leading `#/` is stripped. Example: `paths=['[0]/name']` reads the name of the first root GameObject.

How to Call

unity-mcp-cli run-tool scene-get-data --input '{
  "openedSceneName": "string_value",
  "includeRootGameObjects": false,
  "includeChildrenDepth": 0,
  "includeBounds": false,
  "includeData": false,
  "paths": "string_value",
  "viewQuery": "string_value"
}'

> For complex input (multi-line strings, code), save the JSON to a file and use: > ```bash > unity-mcp-cli run-tool scene-get-data --input-file args.json > ``` > > Or pipe via stdin (recommended): > ```bash > unity-mcp-cli run-tool scene-get-data --input-file - <<'EOF' > {"param": "value"} > EOF > ```

Troubleshooting

If `unity-mcp-cli` is not found, either install it globally (`npm install -g unity-mcp-cli`) or use `npx unity-mcp-cli` instead. Read the /unity-initial-setup skill for detailed installation instructions.

Input

| Name | Type | Required | Description | |------|------|----------|-------------| | `openedSceneName` | `string` | No | Name of the opened scene. If empty or null, the active scene will be used. | | `includeRootGameObjects` | `boolean` | No | If true, includes root GameObjects in the scene data. | | `includeChildrenDepth` | `integer` | No | Determines the depth of the hierarchy to include. | | `includeBounds` | `boolean` | No | If true, includes bounding box information for GameObjects. | | `includeData` | `boolean` | No | If true, includes component data for GameObjects. | | `paths` | `any` | No | Optional. List of paths to read individually via Reflector.TryReadAt against the scene's root-GameObjects array. Path syntax: 'fieldName', '[i]/field', '[i]/component/[j]/property'. Mutually exclusive with 'viewQuery'. | | `viewQuery` | `any` | No | Optional. View-query filter routed through Reflector.View on the scene's root-GameObjects array. Mutually exclusive with 'paths'. |

Input JSON Schema

{
  "type": "object",
  "properties": {
    "openedSceneName": {
      "type": "string"
    },
    "includeRootGameObjects": {
      "type": "boolean"
    },
    "includeChildrenDepth": {
      "type": "integer"
    },
    "includeBounds": {
      "type": "boolean"
    },
    "includeData": {
      "type": "boolean"
    },
    "paths": {
      "$ref": "#/$defs/System.Collections.Generic.List(System.String)"
    },
    "viewQuery": {
      "$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.ViewQuery"
    }
  },
  "$defs": {
    "System.Collections.Generic.List(System.String)": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "System.Type": {
      "type": "string"
    },
    "com.IvanMurzak.ReflectorNet.Model.ViewQuery": {
      "type": "object",
      "properties": {
        "Path": {
          "type": "string",
          "description": "Navigate to this path first, then serialize only that subtree. Path segments are separated by '/'. Use '[i]' for array/list index (e.g. 'users/[2]/name') and '[key]' for dictionary entry (e.g. 'config/[timeout]'). A leading '#/' is stripped automatically. Examples: 'admin/name', 'users/[0]/email', 'config/[timeout]'. Leave null to start from the root object."
        },
        "NamePattern": {
          "type": "string",
          "description": "Case-insensitive .NET regex pattern matched against field and property names. Only branches containing at least one match are kept in the result tree. Examples: 'orbitRadius' (exact name), 'orbit.*' (prefix match), 'radius|speed' (either name). When nothing matches, the root envelope is returned with empty fields/props. Leave null to return all fields and properties without filtering."
        },
        "MaxDepth": {
          "type": "integer",
          "description": "Maximum nesting depth of the returned serialized tree. 0 = root type name and value only — no nested fields or properties. 1 = one level of fields/props visible, their children stripped. 2 = two levels visible, and so on. Leave null (default) for unlimited depth."
        },
        "TypeFilter": {
          "$ref": "#/$defs/System.Type",
          "description": "When set, prunes the result tree to members whose runtime type is assignable to this type. Non-matching branches are removed; the root envelope is always preserved. Examples: typeof(float) keeps only float fields, typeof(IEnumerable) keeps only collections. Leave null to include members of any type."
        }
      }
    }
  }
}

Output

Output JSON Schema

{
  "type": "object",
  "properties": {
    "result": {
      "$ref": "#/$defs/AIGD.SceneData",
      "description": "Scene reference. Used to find a Scene."
    }
  },
  "$defs": {
    "System.Collections.Generic.List(AIGD.GameObjectData)": {
      "type": "array",
Read more
Ships withivanmurzak-unity-mcp

Get up and running in three steps: Install plugin — download the .unitypackage installer or run openupm add com.ivanmurzak.unity.mcp Alternative: npx unity-mcp-cli install-plugin ./MyUnityProject — see CLI documentation Pick an AI agent — Claude Code, Claude

Get the whole plugin
Stats
3,845
Stars
349
Forks
Active
Maintenance
C#
Language
Apache-2.0
License
12h ago
Last commit
1y ago
Created

Repo: IvanMurzak/Unity-MCP