You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -24,23 +25,20 @@ A package that brings data-binding to your Unity project.
24
25
25
26
## :pencil: About
26
27
27
-
The **UnityMvvmToolkit** is designed to accelerate the development of MVVM applications in Unity. Use the samples as a starting point for understanding how to utilize the package.
28
-
29
-
<!--This repository contains initial samples for how to utilize the package.
30
-
31
-
It mostly designed for UI Toolkit but you can use it with UGUI as well.-->
32
-
33
-
It is built around the following principles:
34
-
- ...
35
-
- ...
36
-
- ...
28
+
The **UnityMvvmToolkit** is a package that allows you to bind UI elements in your `UI Document` or `Canvas` to data sources in your app. Use the samples as a starting point for understanding how to utilize the package.
37
29
38
-
### Restrictions
39
-
40
-
...
30
+
#### Key features:
31
+
- Runtime data-binding
32
+
- UI Toolkit & uGUI integration
33
+
- Multiple-properties binding
34
+
- Custom UI Elements support
35
+
- Compatible with [UniTask](https://github.com/Cysharp/UniTask)
36
+
- Mono & IL2CPP support[*](#il2cpp-restriction)
41
37
42
38
### Samples
43
39
40
+
The following example shows the **UnityMvvmToolkit** in action using the **Counter** app.
You can install UnityMvvmToolkit in one of the following ways:
150
148
151
149
<details><summary>1. Install via Package Manager</summary>
@@ -174,22 +172,61 @@ You can install UnityMvvmToolkit in one of the following ways:
174
172
You can add `https://github.com/ChebanovDD/UnityMvvmToolkit.git?path=src/UnityMvvmToolkit.UnityPackage/Assets/Plugins/UnityMvvmToolkit` to the Package Manager.
175
173
176
174
If you want to set a target version, UnityMvvmToolkit uses the `v*.*.*` release tag, so you can specify a version like `#v0.1.0`. For example `https://github.com/ChebanovDD/UnityMvvmToolkit.git?path=src/UnityMvvmToolkit.UnityPackage/Assets/Plugins/UnityMvvmToolkit#v0.1.0`.
177
-
178
-
> **Note:** Dependencies must be installed before installing the package.
The **UnityMvvmToolkit** uses generic virtual methods under the hood to create bindable properties, but `IL2CPP` in `Unity 2021` does not support [Full Generic Sharing](https://blog.unity.com/technology/feature-preview-il2cpp-full-generic-sharing-in-unity-20221-beta) this restriction will be removed in `Unity 2022`.
187
181
188
-
> **Note:** Dependencies must be installed before installing the packages.
182
+
To work around this issue in `Unity 2021` you need to change the `IL2CPP Code Generation` setting in the `Build Settings` window to `Faster (smaller) builds`.
The package contains a collection of standard, self-contained, lightweight types that provide a starting implementation for building apps using the MVVM pattern.
194
+
195
+
The included types are:
196
+
197
+
- ViewModel
198
+
- CanvasView<TBindingContext>
199
+
- DocumentView<TBindingContext>
200
+
- Command
201
+
- Command\<T\>
202
+
- AsyncCommand
203
+
- AsyncCommand\<T\>
204
+
- AsyncLazyCommand
205
+
- AsyncLazyCommand\<T\>
206
+
- CommandWrapper
207
+
- ICommand
208
+
- ICommand\<T\>
209
+
- IAsyncCommand
210
+
- IAsyncCommand\<T\>
211
+
- ICommandWrapper
212
+
213
+
### ViewModel
214
+
215
+
The `ViewModel` is a base class for objects that are observable by implementing the INotifyPropertyChanged interface. It can be used as a starting point for all kinds of objects that need to support property change notification.
216
+
217
+
### CanvasView
218
+
219
+
### DocumentView
220
+
221
+
### Command
222
+
223
+
The `Command` and `Command<T>` are ICommand implementations that can expose a method or delegate to the view. These types act as a way to bind commands between the viewmodel and UI elements.
224
+
225
+
### Property value converter
226
+
227
+
### Parameter value converter
228
+
229
+
### Custom control
193
230
194
231
...
195
232
@@ -208,7 +245,36 @@ You can install UnityMvvmToolkit in one of the following ways:
0 commit comments