Agent skill

Unity UI Toolkit

Assists with Unity UI Toolkit development - UXML structure, USS styling, C# VisualElement manipulation, data binding, and custom controls. Use when implementing UI Toolkit interfaces.

Stars 77
Forks 9

Install this agent skill to your Project

npx add-skill https://github.com/Dev-GOM/claude-code-marketplace/tree/main/plugins/unity-dev-toolkit/skills/unity-uitoolkit

SKILL.md

Unity UI Toolkit

Assists with Unity UI Toolkit development including UXML markup, USS styling, C# VisualElement API, and modern UI patterns.

What This Skill Helps With

UXML Structure

  • Proper element hierarchy and naming conventions
  • Common controls: TextField, Button, Toggle, Slider, ObjectField, ListView
  • Layout containers: VisualElement, ScrollView, Foldout, TwoPaneSplitView
  • Data-driven UI with templates and bindings

USS Styling

  • Class-based styling and selectors
  • Flexbox layout (flex-direction, justify-content, align-items)
  • USS variables and dark theme optimization
  • Pseudo-classes (:hover, :active, :disabled)
  • Transitions and animations

C# VisualElement API

  • Query API: rootElement.Q<Button>("my-button")
  • Event handling: .clicked += and .RegisterValueChangedCallback()
  • Dynamic UI creation with constructors
  • Data binding with Bind() and SerializedObject

Best Practices

  • UXML for structure, USS for styling, C# for logic
  • Name elements for Query API access
  • Use classes for styling, not inline styles
  • Cache VisualElement references in fields
  • Proper event cleanup in OnDestroy()

Common Patterns

Editor Window Setup:

csharp
public void CreateGUI() {
    var visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>("path/to.uxml");
    visualTree.CloneTree(rootVisualElement);

    var button = rootVisualElement.Q<Button>("my-button");
    button.clicked += OnButtonClick;
}

USS Class Toggle:

csharp
element.AddToClassList("active");
element.RemoveFromClassList("active");
element.ToggleInClassList("active");

Data Binding:

csharp
var so = new SerializedObject(target);
rootVisualElement.Bind(so);

Unity Version Requirements

  • Unity 2021.2+ for runtime UI Toolkit
  • Unity 2019.4+ for editor-only UI Toolkit (limited features)

See ui-toolkit-reference.md for complete API documentation.

When to Use vs Other Components

Use this Skill when: Building UI Toolkit interfaces, writing UXML/USS, or manipulating VisualElements in C#

Use unity-ui-selector skill when: Choosing between UGUI and UI Toolkit for a project

Use @unity-scripter agent when: Implementing complex UI logic or custom VisualElement controls

Use EditorScriptUIToolkit templates when: Generating new UI Toolkit editor windows with UXML/USS files

Related Skills

  • unity-ui-selector: Helps choose between UGUI and UI Toolkit
  • unity-template-generator: Generates UI Toolkit editor script templates
  • unity-script-validator: Validates UI Toolkit code patterns

Expand your agent's capabilities with these related and highly-rated skills.

Dev-GOM/claude-code-marketplace

unity-editor-toolkit

Unity Editor control and automation, WebSocket-based real-time communication. 유니티에디터제어및자동화, WebSocket기반실시간통신. Features/기능: GameObject control 게임오브젝트제어, Transform manipulation 트랜스폼조작, Component management 컴포넌트관리, Scene management 씬관리, SQLite database integration SQLite데이터베이스통합, GUID-based persistence GUID기반영구식별, Multi-scene synchronization 멀티씬동기화, Command Pattern with Undo/Redo 명령패턴실행취소재실행, Menu execution 메뉴실행, ScriptableObject management 스크립터블오브젝트관리, Array/List manipulation 배열리스트조작, All field types support 모든필드타입지원, Material/Rendering 머티리얼/렌더링, Prefab system 프리팹시스템, Asset Database 애셋데이터베이스, Animation 애니메이션, Physics 물리, Console logging 콘솔로깅, EditorPrefs management 에디터프리퍼런스관리, Editor automation 에디터자동화, Build pipeline 빌드파이프라인, Lighting 라이팅, Camera 카메라, Audio 오디오, Navigation 네비게이션, Particles 파티클, Timeline 타임라인, UI Toolkit, Profiler 프로파일러, Test Runner 테스트러너. Protocol 프로토콜: JSON-RPC 2.0 over WebSocket (port 9500-9600). 500+ commands 명령어, 25 categories 카테고리. Real-time bidirectional communication 실시간양방향통신. Security 보안: Defense-in-depth 심층방어 (path traversal protection 경로순회방지, command injection defense 명령어인젝션방어, JSON injection prevention JSON인젝션방지, SQL injection prevention SQL인젝션방지, transaction safety 트랜잭션안전성). Localhost-only connections 로컬호스트전용. Cross-platform 크로스플랫폼 (Windows, macOS, Linux).

77 9
Explore
Dev-GOM/claude-code-marketplace

blender-toolkit

Blender automation with geometry creation, materials, modifiers, and Mixamo animation retargeting. Core Features: WebSocket-based real-time control, automatic bone mapping with UI review, two-phase confirmation workflow, quality assessment, multi-project support, comprehensive CLI commands. Use Cases: Create 3D primitives (cube, sphere, cylinder, etc.), manipulate objects (transform, duplicate, delete), manage materials and modifiers, retarget Mixamo animations to custom rigs with fuzzy bone matching.

77 9
Explore
Dev-GOM/claude-code-marketplace

unity-test-runner

Execute and analyze Unity Test Framework tests from the command line. This skill automates test execution for Unity projects by detecting the Unity Editor, configuring test parameters (EditMode/PlayMode), running tests via CLI, parsing XML results, and generating detailed failure reports. Use this when running Unity tests, validating game logic, or debugging test failures.

77 9
Explore
Dev-GOM/claude-code-marketplace

Unity Template Generator

Generates production-ready C# script templates (MonoBehaviour, ScriptableObject, Editor, tests). Use when creating new scripts or setting up project structure.

77 9
Explore
Dev-GOM/claude-code-marketplace

unity-compile-fixer

Detect and resolve Unity C# compilation errors using VSCode diagnostics. Use this skill when Unity projects have compilation errors that need diagnosis and automated fixes. Analyzes errors from VSCode Language Server, proposes solutions based on error patterns, and handles version control conflicts for Unity projects.

77 9
Explore
Dev-GOM/claude-code-marketplace

Unity Script Validator

Validates C# scripts for best practices, performance, and Unity patterns. Use when reviewing scripts or checking code quality.

77 9
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results