Unity Figma Importer
  • Getting Started
    • Figma Design Downloader
    • Figma Design
    • Unity Canvas Setup
  • Layout
    • Horizontal & Vertical Layouts
    • Grid Layout
  • Components
    • Text
    • Image
    • Button
    • Toggle
    • Slider
    • Scroll View
    • Input Field
    • Dropdown
    • Custom Component
  • Limitations
  • Bindings
  • Optimization
Powered by GitBook
On this page
  • Unity Importer Plugin
  • "State" variant
  • "Checked" variant

Was this helpful?

  1. Components

Toggle

PreviousButtonNextSlider

Last updated 1 year ago

Was this helpful?

In order for a Toggle from Figma to be imported to Unity automatically, certain rules apply when designing a toggle in Figma.

Unity Importer Plugin

In order for Figma Importer to understand which component it is trying to convert a figma node to a Unity UI element, Component Type from Unity Importer plugin must be selected as desired component type. "Toggle" component type should be selected when designing a toggle.

"State" variant

Toggles have 4 states: Default, Hover, Press, Disabled. These states must be designed as variants of a toggle component in Figma. The variant name in Figma must be "State" otherwise the importer won't be able to identify it.

"Checked" variant

Toggles have 2 condition: On or Off. Checked variant is used with combination of State variant. So, a variant of a Toggle component set may be: Default, Checked On. The variant name in Figma must be "Checked" otherwise the importer won't be able to identify it.

The hierarchy of child nodes of a component set's variant must be the same for each and every one of them.

Keep in mind that components & component sets are never imported to Unity, only instances of them are imported.

A toggle component set in Figma