2.3 KiB
2.3 KiB
| name | description | metadata | ||
|---|---|---|---|---|
| inputsystem-modify | Generic write escape-hatch: apply a `SerializedMember` diff to the `InputActionAsset` object itself via ReflectorNet `TryModify`, for fields not covered by the dedicated tools. Use 'inputsystem-get' first to inspect the structure. |
|
InputSystem / Modify Asset (generic)
Modify an InputActionAsset by applying a SerializedMember diff via ReflectorNet. This is the generic escape hatch for asset-level fields/properties that the dedicated tools do not expose.
Inputs
assetPath— required. Path to the existing.inputactionsasset.data— theSerializedMemberdiff to apply. Route fields through thefieldschannel and properties through thepropschannel — ReflectorNet resolves them separately with no cross-fallback.
Behavior
Loads the asset, applies the diff via Reflector.TryModify, and on success re-serializes and saves the asset back to disk. The applied logs are returned. Runs on the Unity main thread.
How to Call
unity-mcp-cli run-tool inputsystem-modify --input '{
"assetPath": "string_value",
"data": "string_value"
}'
For complex input (multi-line strings, code), save the JSON to a file and use:
unity-mcp-cli run-tool inputsystem-modify --input-file args.jsonOr pipe via stdin (recommended):
unity-mcp-cli run-tool inputsystem-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 |
|---|---|---|---|
assetPath |
string |
Yes | 'Assets/'-rooted path to the existing '.inputactions' asset. |
data |
string |
Yes | The SerializedMember diff to apply. Fields go through the 'fields' channel; properties through 'props'. RQL: SerializedMember |
Input JSON Schema
{
"type": "object",
"properties": {
"assetPath": {
"type": "string"
},
"data": {
"type": "string"
}
},
"required": [
"assetPath",
"data"
]
}
Output
This tool does not return structured output.