map_to_unity
Generate a Unity UGUI mapping spec from a Figma frame: map constraints to RectTransform anchors, auto-layout to layout groups, and get component suggestions with confidence scores and warnings.
Instructions
Produces a Unity UGUI mapping spec from a Figma frame. Maps Figma constraints to RectTransform anchors, auto-layout to HorizontalLayoutGroup/VerticalLayoutGroup, and suggests appropriate Unity components per node type. Includes confidence scores for inferred components and warnings for unknown constraints or unsupported effects.
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": {
"file_key": "<file_key>",
"node_id": "<node_id>",
"access_token": "<access_token>"
},
"name": "map_to_unity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| node_id | Yes | The node ID of the frame to produce a Unity mapping spec for | |
| file_key | Yes | The Figma file key (from the file URL) | |
| access_token | Yes | Your Figma personal access token | |
| canvas_width | No | Target Unity canvas width in pixels | |
| canvas_height | No | Target Unity canvas height in pixels |