какашки мне в кармашки
This commit is contained in:
1 parent
7fba61f7a0
commit
cbda26dfc0
335 files changed
+51926
-7266
No files matched your search
@@ -0,0 +1,307 @@
|
||||
---
|
||||
name: navigation-modify
|
||||
description: "Generic write: apply a `SerializedMember` diff to any NavMesh `Component` on a GameObject via ReflectorNet `TryModify`. Use 'navigation-get' first to inspect the structure so the diff is targeted. Remember: fields go through the `fields` channel, properties through `props`."
|
||||
metadata:
|
||||
generated-by: mcp-plugin-dotnet
|
||||
---
|
||||
|
||||
# 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` — the `SerializedMember` diff to apply. Include only the members you want to change. C# fields must be supplied through the `fields` channel and properties through `props` (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
|
||||
|
||||
```bash
|
||||
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:
|
||||
> ```bash
|
||||
> unity-mcp-cli run-tool navigation-modify --input-file args.json
|
||||
> ```
|
||||
>
|
||||
> Or pipe via stdin (recommended):
|
||||
> ```bash
|
||||
> 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
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"gameObjectRef": {
|
||||
"$ref": "#/$defs/AIGD.GameObjectRef"
|
||||
},
|
||||
"data": {
|
||||
"$ref": "#/$defs/com.IvanMurzak.ReflectorNet.Model.SerializedMember"
|
||||
},
|
||||
"componentRef": {
|
||||
"$ref": "#/$defs/AIGD.ComponentRef"
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"UnityEngine.EntityId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+$"
|
||||
},
|
||||
"System.Type": {
|
||||
"type": "string"
|
||||
},
|
||||
"AIGD.GameObjectRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"instanceID": {
|
||||
"$ref": "#/$defs/UnityEngine.EntityId",
|
||||
"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": {
|
||||
"$ref": "#/$defs/UnityEngine.EntityId",
|
||||
"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
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"result": {
|
||||
"$ref": "#/$defs/com.IvanMurzak.Unity.MCP.Editor.API.Tool_Navigation-NavigationModifyResponse"
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"AIGD.GameObjectRef": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"instanceID": {
|
||||
"$ref": "#/$defs/UnityEngine.EntityId",
|
||||
"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."
|
||||
},
|
||||
"UnityEngine.EntityId": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]+$"
|
||||
},
|
||||
"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": {
|
||||
"$ref": "#/$defs/UnityEngine.EntityId",
|
||||
"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"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user