Back to projects

Unity plugin · Figma → uGUI

Regalia

This plugin carries your game's interface from Figma into Unity. Color and text styles become a palette and text styles in uGUI and TextMeshPro, ic- and img- components become sprites, components become prefabs, and whole screens become a Unity scene with working prototype links. Nothing lands in the project quietly: every sync arrives as a change list you review and accept

What can be synced

  • Project components as prefabs with switchable states With Auto layout, Boolean, Instance, Grid, Lock aspect ratio and scrolling. Variants may differ in corner radii and strokes
  • Color and text styles with opacity, case and spacing Including gradients on fills, strokes and text, shadows and different stroke types
  • Prototype links and transition animations Clicks, keys, hover, overlays, Scroll to, Dissolve, Move, Push, Slide and Smart animate
  • Vector icons (SVG) and raster images (PNG x2) By the ic- and img- prefixes in the name
  • Fonts from Google Fonts in one click, or from a local folder
  • Pictures in a layer fill Fill, Fit, Crop and Tile, rounded shapes included. Downloaded in token mode
  • Vectors, lines and boolean shapes They arrive as SVG sprites and keep their color style
  • Boolean and text component properties Carried from every instance, switched in the game with FigmaProperties.Set

What cannot be synced

  • Blurs, blend modes and some shadows Layer blur, Background blur, blend modes other than Normal, an inner shadow on a text and a shadow on an icon or on a frame with no fill do not transfer, and the plugin warns about them
  • Grid with calc() and percents Such tracks become equal. Grids in px, fr and Hug transfer as they are
  • An image or video in a color style Such a style does not transfer — make the picture an img- component
  • Variables by token and picture fills through the agent REST returns Variables only on the Enterprise plan, so they come through the agent. The agent does not download picture fills — the place stays empty

How to use the plugin

How to connect the plugin, accept a sync and keep hand edits on a prefab

Quick start

The demo is already in the project: Samples/Demo/Scenes/Startscreen.unity. Play works with no Figma and no token. To try a sync, duplicate the Starter Kit and connect the copy, or go straight to your own project

  • DoOpen Startscreen and press Play
  • Don'tRun the demo without TMP Essential Resources

Two working modes

By default the plugin reads Figma itself with a personal token, no agent and no MCP. The other way is your agent via Figma MCP and MCP for Unity. In both modes you accept the changes

Scopes the token needs

  • current_user:read
  • file_content:read
  • library_content:read
  • DoThe token stays on your machine only
  • Don'tSync through the agent after every edit on a View / Collab seat

Project settings

Everything the plugin needs sits in one settings asset: the Figma file, the component registry, the excluded styles and the project folders. Create it with Assets → Create → Regalia → Settings, and the plugin folders appear next to it

  • DoKeep it next to the project UI, in git
  • Don'tCreate the settings in the Assets root

Colors and fonts

Put UiColorRef on an image or a text and UiTextStyleRef on TMP. They take the color and the font from Figma styles, and after a sync the interface recolors itself

// dark theme in one line
variables.SetMode("Theme", "Dark");
  • DoChange the color in Figma and sync
  • Don'tSet the color by hand in the inspector

Sync

Synchronize creates a draft in UserSettings, outside Assets. It reaches the project only after Accept the updates

  • DoReview what is new, changed and removed
  • Don'tExpect the changes to land in the project by themselves

Components · beta

A variant set becomes one prefab with states. The prefab is rebuilt from Figma, so hand edits in it get wiped

buttonVariants.Set("Size", "Large");
  • DoButton logic in a Prefab Variant on top of the prefab
  • Don'tEdit the built button prefab by hand

Component properties

Boolean and text properties of a component go to FigmaProperties on the prefab root, each with the layers bound to it. An instance carries its values over

properties.Set("Show icon", false);
properties.Set("Label", "Play");
  • DoA switch of the variant keeps the values
  • Don'tSet the values again after every switch of the variant

States

A set with Default, Hover, Pressed, Disabled, Focused switches the variant from mouse, keyboard and gamepad

  • DoState = Default / Hover / Pressed
  • Don'tYour own value names, like On / Off

Screens

The Screens tab works in token mode. Marked sections become screens, and Move the screen moves its components first. Build a scene adds a camera, a Canvas and transitions along prototype links

  • DoThe same name for copies, up to the “[” character
  • Don'tDifferent names for copies of one screen

Resources and fonts

ic- icons arrive as SVG, img- images as PNG ×2. A missing font is downloaded from Google Fonts or linked from a folder

  • Doic-lockClose-28 and img-PlayerCard-bg
  • Don'ticon-lock or image 12

Find a layer

Need a Figma object in code? FigmaNodeRef.Find finds it by the layer id. The same call works for a nested and a flat screen

var title = FigmaNodeRef.Find(root, "857:470");
  • DoThe id from the layer link: node-id=857-470 → 857:470
  • Don'tLook an object up by name — long texts get renamed

The full guide and the plugin layout live in: Documentation/DeveloperGuide.en.md and Documentation/README.md

FAQ

Why did my style not arrive in Unity

Its import checkbox is cleared on the Styles tab. In token mode there is one more case: the style is applied to no layer, so REST does not return it

The window says “node missing”

The layer was deleted and drawn again, so it has a new id. Import the component once more and edit existing layers after that

Does the plugin spend the Figma limit

In token mode, no. In agent mode a sync, a component import or an image download is one call. Icons go in batches of 10–20

Can I edit a built prefab

A rebuild comes from Figma and wipes hand edits. Put the logic on a Prefab Variant on top of the prefab

Text in the Game view is blurry

In the Game view aspect menu on macOS, turn off Low Resolution Aspect Ratios. That is the preview, not the font or the transfer

The demo texts do not show

Import the TextMeshPro resources: Window → TextMeshPro → Import TMP Essential Resources. Without them the demo has no TMP_SDF-Mobile shader

Where is the Figma token kept

In your user file LocalApplicationData/Regalia/figma-token. It does not travel with the project. If it leaks, revoke it in Figma

Support

Questions and bugs help@makstorch.com
Be sure to include the plugin version, Unity, OS, and attach screenshots