DEV Community

Cover image for Unity UI Framework
Devs Daddy
Devs Daddy

Posted on

Unity UI Framework

Hello everyone. Today I want to present a small library for your Unity Games. Unity UI Framework - A set of tools for interface developers, ready to use in your projects and supporting the MVC/MVP/MVVVM patterns. The basic architecture works based on View and Layouts, and interaction is handled by an event system to make your interface logic independent.

Toolkit Features:

  • Ready for MVP/MVC/MVVM;
  • Views and Layouts loading from Scene / Resources;
  • UI Controller for Views Management and Navigation;
  • Binding / Unbinging Events;
  • UI Particle System and UI Shaders;
  • Simple Components Like Imaged Button and Web Image;
  • Optimized for every platform;

Dependencies and Requirements:

  • Unity 2019+;
  • Unity Event Framework (included in project);
  • Unity UI (UGUI);
  • TextMesh Pro UGUI;

Get Started

Unity UI Framework is designed for your application and games using Unity UI (UGUI) and support Unity 2019+.

Installation process:

  • Download and import latest release from this page;
  • See usage examples below;

See Demo Scene to learn how it works (UIFrameworkDemo):
Unity UI Framework Demo

How it works?

The UI Framework works according to the View / Navigation / Layouts scheme. And separates entities between them. Each screen or window is a View that is stored in history for navigation. Each View can have its own unlimited number of Layouts. One of the View must be the home View for navigation.

For more info see Usage Examples or see Demo Scene. Also I recommend to see One UI Kit based on UI Framework.

Simple Usage

Views Binding:

UIFramework.BindView(Instantiate(homeView), true); // Home Page
UIFramework.BindView(Instantiate(pageView));       // Sub-Page
Enter fullscreen mode Exit fullscreen mode

Navigate to another view:

EventMessenger.Main.Publish(new OnViewNavigated {
    View = typeof(DemoPageView),
    Display = new DisplayOptions { IsAnimated = true, Delay = 0f, Duration = 0.5f, Type = AnimationType.Fade },
    Data = new DemoPageView.Data {
        Title = "Demo Page",
        Content = pageContent
    }
});
Enter fullscreen mode Exit fullscreen mode

Download latest version / Learn API reference:
https://github.com/DevsDaddy/UIFramework


My Discord | My Blog | My GitHub | Buy me a Beer

Top comments (0)