Imported from Pancakeshake/Zombera (
.agents/skills/navigation-modify/SKILL.md). Install upstream withnpx skills add Pancakeshake/Zombera --skill navigation-modify. Copyright stays with the author.
Navigation / Modify Component
Modify any NavMesh component on a GameObject by applying a SerializedMember diff via ReflectorNet. This is the generic escape hatch for fields not covered by the dedicated tools.
Inputs
gameObjectRef— the GameObject hosting the component (required).data— theSerializedMemberdiff to apply. Include only the members you want to change. C# fields must be supplied through thefieldschannel and properties throughprops(no cross-fallback).componentRef— optional. Resolves a specific component when the GameObject has more than one NavMesh component; otherwise the first recognized NavMesh component is used.
Behavior
Finds the target NavMesh component, applies the diff via Reflector.TryModify, and on success marks the component + scene dirty and repaints. The applied logs are returned. Runs on the Unity main thread.
How to Call
unity-mcp-cli run-tool navigation-modify --input '{
"gameObjectRef": "string_value",
"data": "string_value",
"componentRef": "string_value"
}'
For complex input (multi-line strings, code), save the JSON to a file and use:
unity-mcp-cli run-tool navigation-modify --input-file args.jsonOr pipe via stdin (recommended):
unity-mcp-cli run-tool navigation-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 instructions.
Input
| Name | Type | Required | Description |
|---|---|---|---|
gameObjectRef |
any |
Yes | Reference to the GameObject containing the NavMesh component. |
data |
any |
Yes | The SerializedMember diff to apply. Only include members you want to change. |
componentRef |
any |
No | Optional reference to a specific NavMesh component if the GameObject has multiple. |
Input JSON Schema
{
"type": "object",
"properties": {
"gameObjectRef": {
"$ref": "#/$defs/AIGD.GameObjectRef"
},
"data": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
},
"componentRef": {
"$ref": "#/$defs/AIGD.ComponentRef"
}
},
"$defs": {
"System.Type": {
"type": "string"
},
"AIGD.GameObjectRef": {
"type": "object",
"properties": {
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If it is '0' and 'path', 'name', 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'. Priority: 1 (Recommended)"
},
"path": {
"type": "string",
"description": "Path of a GameObject in the hierarchy Sample 'character/hand/finger/particle'. Priority: 2."
},
"name": {
"type": "string",
"description": "Name of a GameObject in hierarchy. Priority: 3."
},
"assetType": {
"$ref": "#/$defs/System.Type",
"description": "Type of the asset."
},
"assetPath": {
"type": "string",
"description": "Path to the asset within the project. Starts with 'Assets/'"
},
"assetGuid": {
"type": "string",
"description": "Unique identifier for the asset."
}
},
"required": [
"instanceID"
],
"description": "Find GameObject in opened Prefab or in the active Scene."
},
"com.IvanMurzak.ReflectorNet.Model.SerializedMemberList": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
}
},
"com.IvanMurzak.ReflectorNet.Model.SerializedMember": {
"type": "object",
"properties": {
"typeName": {
"type": "string",
"description": "Full type name. Eg: 'System.String', 'System.Int32', 'UnityEngine.Vector3', etc."
},
"name": {
"type": "string",
"description": "Object name."
},
"value": {
"description": "Value of the object, serialized as a non stringified JSON element. Can be null if the value is not set. Can be default value if the value is an empty object or array json."
},
"fields": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
"description": "Nested field value."
},
"description": "Fields of the object, serialized as a list of 'SerializedMember'."
},
"props": {
"type": "array",
"items": {
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember",
"description": "Nested property value."
},
"description": "Properties of the object, serialized as a list of 'SerializedMember'."
}
},
"required": [
"typeName"
],
"additionalProperties": false
},
"AIGD.ComponentRef": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"description": "Component 'index' attached to a gameObject. The first index is '0' and that is usually Transform or RectTransform. Priority: 2. Default value is -1."
},
"typeName": {
"type": "string",
"description": "Component type full name. Sample 'UnityEngine.Transform'. If the gameObject has two components of the same type, the output component is unpredictable. Priority: 3. Default value is null."
},
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If this is '0', then it will be used as 'null'."
}
},
"required": [
"index",
"instanceID"
],
"description": "Component reference. Used to find a Component at GameObject."
}
},
"required": [
"gameObjectRef",
"data"
]
}
Output
Output JSON Schema
{
"type": "object",
"properties": {
"result": {
"$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Navigation-NavigationModifyResponse"
}
},
"$defs": {
"AIGD.GameObjectRef": {
"type": "object",
"properties": {
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If it is '0' and 'path', 'name', 'assetPath' and 'assetGuid' is not provided, empty or null, then it will be used as 'null'. Priority: 1 (Recommended)"
},
"path": {
"type": "string",
"description": "Path of a GameObject in the hierarchy Sample 'character/hand/finger/particle'. Priority: 2."
},
"name": {
"type": "string",
"description": "Name of a GameObject in hierarchy. Priority: 3."
},
"assetType": {
"$ref": "#/$defs/System.Type",
"description": "Type of the asset."
},
"assetPath": {
"type": "string",
"description": "Path to the asset within the project. Starts with 'Assets/'"
},
"assetGuid": {
"type": "string",
"description": "Unique identifier for the asset."
}
},
"required": [
"instanceID"
],
"description": "Find GameObject in opened Prefab or in the active Scene."
},
"System.Type": {
"type": "string"
},
"AIGD.ComponentRef": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"description": "Component 'index' attached to a gameObject. The first index is '0' and that is usually Transform or RectTransform. Priority: 2. Default value is -1."
},
"typeName": {
"type": "string",
"description": "Component type full name. Sample 'UnityEngine.Transform'. If the gameObject has two components of the same type, the output component is unpredictable. Priority: 3. Default value is null."
},
"instanceID": {
"type": "integer",
"description": "instanceID of the UnityEngine.Object. If this is '0', then it will be used as 'null'."
}
},
"required": [
"index",
"instanceID"
],
"description": "Component reference. Used to find a Component at GameObject."
},
"System.String-1": {
"type": "array",
"items": {
"type": "string"
}
},
"com.IvanMurzak.Unity.MCP.Editor.API.Tool_Navigation-NavigationModifyResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Whether the modification was successful."
},
"gameObjectRef": {
"$ref": "#/$defs/AIGD.GameObjectRef",
"description": "Reference to the GameObject containing the component."
},
"componentRef": {
"$ref": "#/$defs/AIGD.ComponentRef",
"description": "Reference to the modified component."
},
"componentIndex": {
"type": "integer",
"description": "Index of the component in the GameObject's component list."
},
"componentType": {
"type": "string",
"description": "Full type name of the modified component."
},
"logs": {
"$ref": "#/$defs/System.String-1",
"description": "Log of modifications and any warnings/errors."
}
},
"required": [
"success",
"componentIndex"
]
}
},
"required": [
"result"
]
}