unity-uitoolkit

Create and edit Unity UI Toolkit USS stylesheets, UXML layouts, and UIDocument scene components.

Updated Jun 21, 2026
One-click install
npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-uitoolkit-du-qwq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: unity-uitoolkit
Source: https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications/tree/main/.agents/skills/unity-skills/skills/uitoolkit
Command: npx skills add https://github.com/du-qwq/Shader-Writing-Architecture-and-Specifications --skill unity-uitoolkit-du-qwq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building Unity UI Toolkit interfaces requires coordinating USS stylesheets, UXML layout files, PanelSettings assets, and UIDocument scene objects, and mistakes like using unsupported CSS properties or mixing UGUI concepts cause broken UI. This Skill provides structured operations for authoring and wiring UITK interfaces correctly. ## Core Features & Use Cases - USS/UXML Authoring: Create, read, write, and batch-generate USS stylesheets and UXML layouts, add or remove elements and style rules, and inspect existing hierarchies before editing. - Scene Integration: Create UIDocument GameObjects, bind UXML and PanelSettings assets, configure scale modes and reference resolutions, and inspect live VisualElement trees. - Templates and CodeGen: Generate starter screens (menu, HUD, dialog, settings, inventory, and more), EditorWindow scripts, and runtime MonoBehaviour query scaffolds. - Use Case: A developer asks for a game HUD. The Skill creates a PanelSettings asset with ScaleWithScreenSize, writes a USS file with design tokens, generates a UXML layout referencing that stylesheet, and attaches everything to a new UIDocument in the scene. ## Quick Start Ask the AI to create a Unity UI Toolkit HUD with a PanelSettings asset, a USS stylesheet, a UXML layout, and a UIDocument attached to the scene.

Frequently Asked Questions about unity-uitoolkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a UI Toolkit layout in Unity?

Create a UXML file for structure and a USS file for styling, then attach them to a UIDocument GameObject with a PanelSettings asset. Use uitk_create_uxml, uitk_create_uss, uitk_create_panel_settings, and uitk_create_document in that order.

What is the difference between UI Toolkit and UGUI Canvas?

UI Toolkit uses UXML for structure, USS for styling, and UIDocument for scene attachment, while UGUI uses Canvas, Button, and Image components. They are separate systems and their skills should not be mixed in one workflow.

Does Unity USS support CSS grid or box-shadow?

No. USS only supports flex layout, so grids are emulated with flex-direction row and flex-wrap. Box-shadow, gradients, calc(), media queries, pseudo-elements, and z-index are unsupported and require workarounds like extra child elements.

Which Unity version is required for UI Toolkit runtime UI?

This Skill requires Unity 2022.3 or newer. Unity 6 additionally supports world-space rendering through PanelSettings world-space options combined with scene-side UIDocument camera setup.

How do I make UI scale across different screen resolutions in Unity?

Set PanelSettings scaleMode to ScaleWithScreenSize and provide referenceResolutionX and referenceResolutionY, typically 1920 by 1080. This scales the UI proportionally instead of using constant pixel sizes.

Why does my USS styling not apply to UXML elements?

The UXML must reference the stylesheet with a Style src tag, and selectors must match element names or classes. Use uitk_inspect_uxml and uitk_list_uss_variables to verify structure and token usage before editing.