3.0 KiB
3.0 KiB
| name | description | metadata | ||
|---|---|---|---|---|
| timeline-modify | Generic write: apply a `SerializedMember` diff to a Timeline object (the `TimelineAsset`, a `TrackAsset`, or a clip's `PlayableAsset`) via ReflectorNet `TryModify`. Use 'timeline-get' first to inspect the structure. Remember: object *fields* must be supplied through the `fields` channel and *properties* through `props` — there is no cross-fallback. |
|
Timeline / Modify Object
Modify a Timeline object by applying a SerializedMember diff via ReflectorNet. This is the generic escape hatch for members not covered by the dedicated tools.
Inputs
assetPath— required.playableTimelineAsset path.data— theSerializedMemberdiff to apply. Put C# fields in thefieldsarray and properties in thepropsarray; ReflectorNet resolves them on separate channels with no fallback.trackName/trackIndex— when set, target a track instead of the whole asset.clipIndex— when >= 0 (and a track is selected), target that clip'sPlayableAsset.
Behavior
Resolves the target, applies the diff via Reflector.TryModify, and on success marks the asset dirty and saves. The applied logs are returned. Runs on the Unity main thread.
How to Call
unity-mcp-cli run-tool timeline-modify --input '{
"assetPath": "string_value",
"data": "string_value",
"trackName": "string_value",
"trackIndex": 0,
"clipIndex": 0
}'
For complex input (multi-line strings, code), save the JSON to a file and use:
unity-mcp-cli run-tool timeline-modify --input-file args.jsonOr pipe via stdin (recommended):
unity-mcp-cli run-tool timeline-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 TimelineAsset (.playable). |
data |
string |
Yes | The SerializedMember diff to apply. Fields go in 'fields', properties in 'props'. RQL: SerializedMember |
trackName |
string |
No | Optional track name to target a track instead of the asset. |
trackIndex |
integer |
No | Root-track index used when trackName is null and a track target is wanted (-1 = asset only). |
clipIndex |
integer |
No | Clip index to target that clip's PlayableAsset (-1 = the track/asset itself). |
Input JSON Schema
{
"type": "object",
"properties": {
"assetPath": {
"type": "string"
},
"data": {
"type": "string"
},
"trackName": {
"type": "string"
},
"trackIndex": {
"type": "integer"
},
"clipIndex": {
"type": "integer"
}
},
"required": [
"assetPath",
"data"
]
}
Output
This tool does not return structured output.