create_prefab
Create a prefab in Unity, optionally adding a MonoBehaviour component and setting serialized field values.
Instructions
Creates a prefab with optional MonoBehaviour script and serialized field values
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": {
"prefabName": "<prefabName>"
},
"name": "create_prefab"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prefabName | Yes | The name of the prefab to create | |
| fieldValues | No | Optional JSON object of serialized field values to apply to the prefab | |
| componentName | No | The name of the MonoBehaviour Component to add to the prefab (optional) |