gameobject-modify

Solid

Modify GameObject fields and properties in opened Prefab or in a Scene. You can modify multiple GameObjects at once. Just provide the same number of GameObject references and SerializedMember objects. Three modification surfaces are available per GameObject (gameObjectDiffs, pathPatchesPerGameObject, jsonPatchesPerGameObject) — see the skill body for details.

AI & Automation 2,976 stars 277 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# GameObject / Modify ## Three modification surfaces Per GameObject — parallel arrays must have the same length as `gameObjectRefs`: 1. `gameObjectDiffs` — full `SerializedMember` diff per GameObject (legacy, backwards compatible). 2. `pathPatchesPerGameObject` — list of `{path, value}` patches per GameObject routed through `Reflector.TryModifyAt`; atomic per-path modification. 3. `jsonPatchesPerGameObject` — JSON Merge Patch per GameObject routed through `Reflector.TryPatch`. When more than one is supplied for the same GameObject they run in this order: `jsonPatch` → `pathPatches` → `diff`. At least one of the three is required. ## Path syntax `fieldName`, `nested/field`, `arrayField/[i]`, `dictField/[key]`. ## How to Call ```bash unity-mcp-cli run-tool gameobject-modify --input '{ "gameObjectRefs": "string_value", "gameObjectDiffs": "string_value", "pathPatchesPerGameObject": "string_value", "jsonPatchesPerGameObject": "string_value" }' ``` > For complex input (multi-line strings, code), save the JSON to a file and use: > ```bash > unity-mcp-cli run-tool gameobject-modify --input-file args.json > ``` > > Or pipe via stdin (recommended): > ```bash > unity-mcp-cli run-tool gameobject-modify --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 ins...

Details

Author
IvanMurzak
Repository
IvanMurzak/Unity-MCP
Created
1 years ago
Last Updated
today
Language
C#
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

gameobject-component-modify

Modify a specific Component on a GameObject in opened Prefab or in a Scene. Allows direct modification of component fields and properties without wrapping in GameObject structure. Use 'gameobject-component-get' first to inspect the component structure before modifying. Three modification surfaces are available (componentDiff, pathPatches, jsonPatch) — see the skill body for details.

2,976 Updated today
IvanMurzak
AI & Automation Solid

object-modify

Modify a Unity `UnityEngine.Object`'s serializable fields/properties. Three modification surfaces are available (`objectDiff`, `pathPatches`, `jsonPatch`) — see the skill body. Use 'object-get-data' first to inspect the object structure.

2,976 Updated today
IvanMurzak
AI & Automation Solid

assets-modify

Modify an asset file in the project. Use 'assets-get-data' first to inspect the asset structure before modifying. Not allowed to modify asset files in the 'Packages/' folder — modify them in 'Assets/'. Three modification surfaces are available (content, pathPatches, jsonPatch) — see the skill body for details.

2,976 Updated today
IvanMurzak
AI & Automation Solid

gameobject-duplicate

Duplicate a batch of GameObjects in the currently opened Prefab or active Scene. Marks each affected scene as dirty after duplication. Use 'gameobject-find' to locate the source GameObjects first.

2,976 Updated today
IvanMurzak
AI & Automation Solid

gameobject-set-parent

Reparent a batch of GameObjects under a new parent in the currently opened Prefab or active Scene. Per-item failures are reported in the returned status string instead of aborting the batch. Use 'gameobject-find' to locate the GameObjects first.

2,976 Updated today
IvanMurzak