diff --git a/README.md b/README.md index 2cfb2d4..5fa6e7d 100644 --- a/README.md +++ b/README.md @@ -1 +1,246 @@ -# UnityMvvmToolkit \ No newline at end of file +# UnityMvvmToolkit + +A package that brings data-binding to your Unity project. + +## :open_book: Table of Contents + +- [About](#pencil-about) + - [Restrictions](#restrictions) + - [Samples](#samples) +- [Folder Structure](#cactus-folder-structure) +- [Installation](#gear-installation) +- [How To Use](#rocket-how-to-use) + - [Add new icons set](#add-new-icons-set) + - [Custom control] +- [External Assets](#external-assets) + - [UniTask](#unitask) +- [Benchmarks](#benchmarks) +- [Contributing](#bookmark_tabs-contributing) + - [Discussions](#discussions) + - [Report a bug](#report-a-bug) + - [Request a feature](#request-a-feature) + - [Show your support](#show-your-support) +- [License](#balance_scale-license) + +## :pencil: About + +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. + + + +It is built around the following principles: +- ... +- ... +- ... + +### Restrictions + +... + +### Samples + +
CounterView +
+ +```xml + + + + + + + + + +``` + +
+ +
CounterViewModel +
+ +```csharp +public class CounterViewModel : ViewModel +{ + private int _count; + private ThemeMode _themeMode; + + public CounterViewModel() + { + IncreaseCommand = new Command(IncreaseCount); + DecreaseCommand = new Command(DecreaseCount); + } + + public int Count + { + get => _count; + set => Set(ref _count, value); + } + + public ThemeMode ThemeMode + { + get => _themeMode; + set => Set(ref _themeMode, value); + } + + public ICommand IncreaseCommand { get; } + public ICommand DecreaseCommand { get; } + + private void IncreaseCount() + { + Count++; + } + + private void DecreaseCount() + { + Count--; + } +} +``` + +
+ + + + + + + + + + + + +
CounterCalculatorToDoList
+ + +
+ +## :cactus: Folder Structure + + . + ├── samples + │ ├── Unity.Mvvm.Calc + │ ├── Unity.Mvvm.Counter + │ ├── Unity.Mvvm.ToDoList + │ └── Unity.Mvvm.CounterLegacy + │ + ├── src + │ ├── UnityMvvmToolkit.Core + │ └── UnityMvvmToolkit.UnityPackage + │ ├── Core # Auto-generated + │ ├── Common + │ ├── External + │ ├── UGUI + │ └── UI # UI Toolkit + │ + ├── UnityMvvmToolkit.sln + +## :gear: Installation + +Dependencies: +- Unity UnityMvvmToolkit: [UniTask](https://openupm.com/packages/com.cysharp.unitask/) + +You can install UnityMvvmToolkit in one of the following ways: + +
1. Install via Package Manager +
+ + The package is available on the [OpenUPM](https://openupm.com/packages/com.chebanovdd.unitymvvmtoolkit/). + + - Open `Edit/Project Settings/Package Manager` + - Add a new `Scoped Registry` (or edit the existing OpenUPM entry) + + ``` + Name package.openupm.com + URL https://package.openupm.com + Scope(s) com.cysharp.unitask + com.chebanovdd.unitymvvmtoolkit + ``` + - Open `Window/Package Manager` + - Select `My Registries` + - Install `UniTask` and `UnityMvvmToolkit` packages + +
+ +
2. Install via Git URL +
+ + You can add `https://github.com/ChebanovDD/UnityMvvmToolkit.git?path=src/UnityMvvmToolkit.UnityPackage/Assets/Plugins/UnityMvvmToolkit` to the Package Manager. + + 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`. + + > **Note:** Dependencies must be installed before installing the package. + +
+ +### [Releases Page](https://github.com/ChebanovDD/UnityMvvmToolkit/releases) + +- ... +- ... +- ... + +> **Note:** Dependencies must be installed before installing the packages. + +## :rocket: How To Use + +### Add new icons set + +... + +## :cherries: External Assets + +### UniTask + +#### Async commands + +... + + +#### Transition async extensions + +... + +## :chart_with_upwards_trend: Benchmarks + +... + +## :bookmark_tabs: Contributing + +You may contribute in several ways like creating new features, fixing bugs or improving documentation and examples. + +### Discussions + +Use [discussions](https://github.com/ChebanovDD/UnityMvvmToolkit/discussions) to have conversations and post answers without opening issues. + +Discussions is a place to: +* Share ideas +* Ask questions +* Engage with other community members + +### Report a bug + +If you find a bug in the source code, please [create bug report](https://github.com/ChebanovDD/UnityMvvmToolkit/issues/new?assignees=ChebanovDD&labels=bug&template=bug_report.md&title=). + +> Please browse [existing issues](https://github.com/ChebanovDD/UnityMvvmToolkit/issues) to see whether a bug has previously been reported. + +### Request a feature + +If you have an idea, or you're missing a capability that would make development easier, please [submit feature request](https://github.com/ChebanovDD/UnityMvvmToolkit/issues/new?assignees=ChebanovDD&labels=enhancement&template=feature_request.md&title=). + +> If a similar feature request already exists, don't forget to leave a "+1" or add additional information, such as your thoughts and vision about the feature. + +### Show your support + +Give a :star: if this project helped you! + +Buy Me A Coffee + +## :balance_scale: License + +Usage is provided under the [MIT License](LICENSE).