mvvm-binding-system

Implements MVVM architecture with reactive data binding for Unity UI Toolkit.

71|11|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/nlelouche/Unity-SkillForge --skill mvvm-binding-system
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mvvm-binding-system
Source: https://github.com/nlelouche/Unity-SkillForge/tree/main/.agent/skills/05-ui-ux/mvvm-binding-system
Command: npx skills add https://github.com/nlelouche/Unity-SkillForge --skill mvvm-binding-system

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill streamlines the creation of dynamic and reactive user interfaces in Unity by implementing the Model-View-ViewModel (MVVM) architectural pattern, specifically for UI Toolkit.

Core Features & Use Cases

  • Reactive Data Binding: Connects UI elements directly to C# properties, automatically updating the UI when data changes and vice-versa.
  • Source Generation: Leverages [CreateProperty] for efficient, boilerplate-free observable properties.
  • Architecture Enforcement: Guides developers in separating concerns between data (Model), presentation logic (ViewModel), and UI rendering (View).
  • Use Case: Building a player health bar that visually updates as the player's health changes in the game, without manual UI manipulation code.

Quick Start

Use the mvvm-binding-system skill to generate a HealthBar UI element bound to a PlayerModel.

Frequently Asked Questions about mvvm-binding-system

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

FAQPage Schema
How do I set up reactive data binding in Unity UI Toolkit?

You can implement MVVM architecture in Unity UI Toolkit by separating data Models, presentation logic ViewModels, and rendering Views, using source generators to create observable properties.

How does the CreateProperty source generator work for MVVM architecture?

The CreateProperty source generator automatically produces boilerplate-free observable C# properties, enabling efficient reactive data binding between your ViewModel logic and Unity UI Toolkit elements.

Can I use MVVM data binding with UXML and USS in Unity?

Yes, you can bind UI elements to game state using C# observable patterns, which automatically synchronize the visual representation with the underlying data model without writing manual refresh logic.

What is the best way to separate UI presentation logic from game data in Unity?

You can build a player health bar by binding a UI Toolkit visual element to a PlayerModel property, allowing the health bar to visually update automatically as health changes.