lanhu_generate_unity_prefab
Generate a staged, verified Unity UGUI prefab YAML snapshot from a Lanhu design packet, so UI developers can turn design specs into editable prefabs in a Unity LTS project.
Instructions
Generate a staged, verified UGUI prefab snapshot for a supported Unity LTS project.
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": {
"packet_id": "<packet_id>",
"unity_project_path": "<unity_project_path>"
},
"name": "lanhu_generate_unity_prefab"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| overwrite | No | Replace files owned by the same packet manifest. | |
| packet_id | Yes | Packet id returned by lanhu_prepare_design. | |
| asset_root | No | Generated asset directory below Assets/. | Assets/LanhuMCP |
| prefab_name | No | Optional prefab name. | |
| text_font_guid | No | Optional default Unity Font guid from an imported .ttf/.otf asset. | |
| component_policy | No | Interactive component policy. | conservative |
| include_reference | No | Copy and include the design reference asset. | |
| prefab_visual_mode | No | Prefab visual rendering strategy. | layered |
| text_font_map_json | No | Optional JSON source-font-name to Unity Font guid mapping. | |
| unity_project_path | Yes | Unity project root containing Assets and ProjectSettings. | |
| use_text_components | No | Use editable UnityEngine.UI.Text nodes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||