← Docs home

Easy UI

An AI-native, responsive UI toolkit for Unity, built entirely on UI Toolkit (UXML & USS). Every screen is readable text – editable by hand, in the UI Builder or by an AI agent. This page gets you to your first screen in just a few minutes.

Requirements: Unity 6000.3 or newer. Easy UI works with Built-in, URP and HDRP – it renders pure UI Toolkit interfaces, independent of the render pipeline.

Installation

  1. Import Easy UI from the Unity Asset Store (Assets/EasyUI/).
  2. Add a UI Document component to a GameObject and assign a PanelSettings asset (or use the one included).
  3. Create a new UXML document – or let the Screen Wizard scaffold a complete screen for you right away.

The 5 core rules

Easy UI is deliberately rule-based – this keeps UI consistent, themeable and safely editable by AI agents. These five rules always apply:

  1. Root class. The topmost element of a screen carries class="eui-root" (UXML), or is built with UI.Root() (C#). Design tokens cascade only from there.
  2. Tokens instead of literals. For color, spacing, radius and font size, always use var(--eui-*) tokens – never #hex or fixed pixel values in component styles.
  3. Classes instead of inline styles. Style via component classes (eui-btn, eui-panel, …). Use inline style="…" only for one-off layout (flex, alignment), never for theming.
  4. Use component tags. Add the namespace xmlns:eui="EasyUI" to the UXML root, then write <eui:EuiButton …/>. Enum values as member names (e.g. variant="Primary").
  5. Keep both paths in sync. Every component can be authored two ways – keep them equivalent (UXML and C#, see below).
i

The catalog of all permitted components, attributes, tokens and CSS classes lives in Assets/EasyUI/AI/easyui.manifest.json. Do not invent classes, attributes or token names that aren't listed there – if something is missing, create a new component/token instead.

Your first screen

Every component can be written in UXML or in C# – the two forms are equivalent. A simple main menu:

MainMenu.uxml
<ui:UXML xmlns:ui="UnityEngine.UIElements" xmlns:eui="EasyUI">
  <ui:VisualElement class="eui-root">
    <eui:EuiPanel>
      <eui:EuiButton text="Play"  variant="Primary" />
      <eui:EuiButton text="Options" variant="Secondary" />
    </eui:EuiPanel>
  </ui:VisualElement>
</ui:UXML>

The same via code, using the fluent UI.* factory:

MainMenu.cs
var root = UI.Root()
    .Add(UI.Panel()
        .Add(UI.Button("Play", OnPlay).Variant(EuiButton.Variant.Primary))
        .Add(UI.Button("Options", OnOptions).Variant(EuiButton.Variant.Secondary)));

document.rootVisualElement.Add(root);

Components

Easy UI ships around 39 themeable components – from general controls to game-UI building blocks. A selection:

AreaComponents (tag)
BasicsEuiButton, EuiPanel, EuiCard, EuiTabs, EuiModal, EuiToast
InputEuiSlider, EuiDropdown, EuiSegmentedControl, EuiColorPicker, EuiCalendar
DataEuiDataTable, EuiPagination, EuiBreadcrumb, EuiSkeleton
Game UIEuiDialogueBox, EuiCurrency, EuiLeaderboard, EuiAbilityButton, EuiQuestLog
ShapesEuiShape (Painter2D: panels, rings, badges – no sprite import)
i

The full reference with all attributes and examples is available under Components (the manifest easyui.manifest.json is authoritative).

Themes

All components are driven by one design-token set. A theme is therefore just a token file – swap it out and the entire UI changes its look. A custom theme:

  1. Duplicate Themes/EasyUI.Tokens.uss.
  2. Keep the .eui-root selector, adjust the values.
  3. Load your new stylesheet instead of the default token stylesheet – no markup changes.

Several ready-made themes are included (among them Retro, Neon, Pastel). A live theme editor (Easy UI ▸ Theme Editor) lets you adjust the tokens with instant preview and export as .uss.

Screen Wizard

The Screen Wizard scaffolds complete screens across several screen types and genres – including UXML, controller and an optional scene. Callable headless:

Terminal
# generate a complete screen (editor batch mode)
Unity -batchmode -executeMethod EasyUI.Editor.Wizard.EuiWizardCLI.Run \
  -eui-wizard-genre RPG \
  -eui-wizard-screens MainMenu,Settings \
  -eui-wizard-out Assets/UI/Generated
!

The capture CLI (screenshot of a UXML file) exits itself via a callback – do not pass it -quit, or it will render nothing.

AI usage

Easy UI is AI-native: because UI is plain text, an AI agent can create and edit screens directly. Two things make this safe:

  • Manifest as a contract – the agent only uses what's in easyui.manifest.json.
  • Headless capabilities – rendering/verifying UXML, screen scaffolding and controller generation are callable via -batchmode -executeMethod or (when the editor is open) via Temp/EasyUI/*-request.json. Everything survives domain reloads.

Combined with AI Forge, the agent can then check and correct its UI itself via screenshots.