create_shader_graph
Create functional Lit or Unlit Unity Shader Graphs for Built-in or URP pipelines, with optional node layout and connections, synchronous compilation, and automatic rollback on failure.
Instructions
Create a functional Lit or Unlit Shader Graph with an active Built-in or URP target using Unity's GraphData and MultiJson APIs. Optional nodes are topology-laid out before creation; connections may address request ids or output blocks such as block:BaseColor. Unity synchronously imports and compiles the graph. Any deserialization, target, unresolved-object, or compiler failure rolls the write back.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"assetPath": "<assetPath>"
},
"name": "create_shader_graph"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | No | ||
| layout | No | ||
| pipeline | No | auto | |
| assetPath | Yes | ||
| overwrite | No | ||
| shaderType | No | unlit | |
| connections | No | ||
| openInEditor | No | ||
| expectedContentHash | No | Required with overwrite=true; use contentHash from inspect_shader_graph. |