object-modify

Apply structured updates to UnityEngine.Object fields and properties.

3.8k|349|Updated Apr 2, 2025
One-click install
npx skills add https://github.com/IvanMurzak/Unity-MCP --skill object-modify-ivanmurzak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: object-modify
Source: https://github.com/IvanMurzak/Unity-MCP/tree/main/Unity-MCP-Plugin/.claude/skills/object-modify
Command: npx skills add https://github.com/IvanMurzak/Unity-MCP --skill object-modify-ivanmurzak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Directly updating UnityEngine.Object instances can be error-prone and hard to audit; this tool provides structured, atomic modifications to object fields and properties.

Core Features & Use Cases

  • Multiple modification surfaces: choose from objectDiff, pathPatches, or jsonPatch to modify serialized data.
  • Atomic updates with defined order: when more than one surface is provided, changes are applied in the order jsonPatch → pathPatches → objectDiff, ensuring predictable results.
  • Inspect-first workflow: use object-get-data to inspect the object structure before modifying, reducing mis-targeting and runtime errors.
  • Use Case: update a GameObject's components or a ScriptableObject's serialized fields across multiple nested objects in a single operation.

Quick Start

Call unity-mcp-cli run-tool object-modify with an objectRef and at least one modification surface to update the target object's fields or properties.

Frequently Asked Questions about object-modify

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

FAQPage Schema
How do I modify Unity object fields and properties safely?

To modify Unity object fields safely, apply structured updates to GameObjects, components, or assets using objectDiff, pathPatches, or jsonPatch surfaces with input validation and error reporting.

What is the best way to update multiple nested Unity components in one operation?

Updating multiple nested Unity components in one operation requires passing an objectRef and a payload describing changes, applying them atomically across the target object's serialized data.

How does the modification order work when applying multiple patch surfaces?

When applying multiple modification surfaces to Unity objects, changes execute in the order jsonPatch, then pathPatches, then objectDiff, ensuring predictable and atomic results across all fields.

Can I update ScriptableObject serialized fields without targeting the wrong data?

Updating ScriptableObject serialized fields safely requires inspecting the object structure first to understand the data layout, then applying precise pathPatches or objectDiff to reduce mis-targeting.

Do I need to inspect Unity objects before modifying their properties?

Inspecting Unity objects before modification is recommended to understand the object structure, reducing mis-targeting and runtime errors when applying structured updates to fields or properties.

What are the limitations of modifying UnityEngine.Object instances directly?

Directly modifying UnityEngine.Object instances can be error-prone and hard to audit, so structured atomic modifications with validation and error reporting are used to ensure precise changes.