unity-ui-data-binding
Installation
SKILL.md
Unity UI Toolkit Data Binding
Connect your game data (Model) to your interface (View) using modern high-performance data binding. This skill leverages Unity's unity.properties system to eliminate "Update" loop logic for UI updates.
Core Features
- BindableProperty: A wrapper class that uses
[CreateProperty]to expose values to the UI Toolkit binding engine. - MVVM (Model-View-ViewModel): Separates raw game data from UI-formatted data using a ViewModel mediator.
- Reactive Synchronization: UI elements update automatically when the underlying property value changes (or is polled by the engine).
- C# Based Binding: Set up complex bindings programmatically without relying on the UI Builder's inspector fields.
Core Files (Max 3)
BindableProperty.cs.txt: Generic property wrapper for data sources.BindingExample.cs.txt: Practical example showing a Coin display and Health bar bound to a ViewModel.