https://github.com/alexmalyutindev/ugui-view-model
Proof of the concept of the view-model binding layer.
https://github.com/alexmalyutindev/ugui-view-model
ui unity
Last synced: 10 months ago
JSON representation
Proof of the concept of the view-model binding layer.
- Host: GitHub
- URL: https://github.com/alexmalyutindev/ugui-view-model
- Owner: alexmalyutindev
- License: mit
- Created: 2023-11-05T13:59:02.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-09T12:34:16.000Z (over 2 years ago)
- Last Synced: 2025-04-15T12:47:08.178Z (about 1 year ago)
- Topics: ui, unity
- Language: C#
- Homepage:
- Size: 107 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[WIP] UGUI ViewModel Binding
---
Simple reactive View-ViewModel binding system for Unity's UGUI.
Usage:
---
```csharp
[ViewModelRoot]
public class MyViewModel : ViewModelRoot
{
[ViewModelProperty("MyFloat")]
private PropertyView _myFloatProperty;
private MyModel _model;
public void Initialize(MyModel model)
{
_model = model;
_model.MyFloat.Subscribe(value => _myFloatProperty.Set(value));
}
}
```
TODOs:
---
- [ ] Add attribute for ViewModel properties
- [ ] Replace field's name binding with unique name or id
- [ ] Setup CI/CD for package