Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.87 KB

README.md

File metadata and controls

55 lines (42 loc) · 1.87 KB

UniMob.UI Github license Unity 2019.3 GitHub package.json version

A declarative library for building reactive user interface. Built over UniMob.

A quick example

So what does code that uses UniMob.UI look like?

using UniMob;
using UniMob.UI;
using UniMob.UI.Widgets;
using UnityEngine;

public class CounterApp : UniMobUIApp
{
    [Atom] private int Counter { get; set; }

    protected override Widget Build(BuildContext context)
    {
        return new Container
        {
            BackgroundColor = Color.cyan,
            Child = new UniMobButton
            {
                OnClick = () => Counter += 1,
                Child = new UniMobText(WidgetSize.Fixed(400, 100))
                {
                    Value = "Tap count: " + Counter,
                    FontSize = 40,
                    MainAxisAlignment = MainAxisAlignment.Center,
                    CrossAxisAlignment = CrossAxisAlignment.Center,
                }
            }
        };
    }
}

More code samples are located in UniMob.UI Samples repository.

How to Install

Minimal Unity Version is 2019.3.

Library distributed as git package (How to install package from git URL)
Git URL (UniMob.UI): https://github.com/codewriter-packages/UniMob.UI.git
Git URL (UniMob): https://github.com/codewriter-packages/UniMob.git

License

UniMob.UI is MIT licensed.

Credits

UniMob.UI inspired by Flutter.