unity_asset_create_prefab
Creates a prefab from a scene GameObject. Provide the GameObject path and the save path for the prefab asset.
Instructions
Create a prefab from an existing GameObject in the scene.
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": {
"gameObjectPath": "<gameObjectPath>",
"savePath": "<savePath>"
},
"name": "unity_asset_create_prefab"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Unity instance port (from unity_select_instance). Always include it when multiple instances run. | |
| savePath | Yes | Where to save the prefab (e.g. 'Assets/Prefabs/MyPrefab.prefab') | |
| gameObjectPath | Yes | Path of the source GameObject in the hierarchy |