Use Cases
Tutorial: Figma → Unity UI
Turn a screen's elements into a Unity UI plan (UXML/USS, control map, bindings).
- 1Name the screen (HUD, Main menu, Inventory…) and list its elements — or use a preset.
- 2Pick the engine (UI Toolkit or uGUI).
- 3Get an element tree, control mapping, style tokens, keyboard focus order, and build steps.
Callable via the API — deterministic, so the output is stable.
curl -X POST $CURFLUFFLE_API_URL/tools/figma.to-ui \
-H "Authorization: Bearer $CURFLUFFLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"screen":"HUD","engine":"UI Toolkit"}'
# → { "ok": true, "data": { "tool": "figma.to-ui",
# "result": { "root": {...}, "styleTokens": [...], "focusOrder": [...] },
# "markdown": "# HUD → Unity UI ..." } }