Skip to content

Unity UI Framework - Full-featured and MVP/MVC/MVVM Ready UI Framework with View/Layout system, flexible management and event-based interaction.

License

DevsDaddy/UIFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity UI Framework

image 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.

Tested at Unity 2019.3+

Dependencies:

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;

Get Started

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

Installation process:

UPM Installation URL:

https://github.com/DevsDaddy/UIFramework.git?path=/Assets/DevsDaddy/Shared/UIFramework/

See Demo Scene to learn how it works (UIFrameworkDemo): image

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.

Usage

Views Binding:

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

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
    }
});

API Reference

The following describes the API for working with the basic methods of the UIFramework, as well as any of the View and Layout presented on the basis of them.

UIFramework Class:

Method Usage
**LoadViewFromResources** (generic) Load View Prefab from Resources and Bind It
**GetView** (generic) Get Binded View of Type
**BindView** (generic) Bind view of type
**UnbindView** (generic) Unbind View of Type
**Navigate** Navigate to another view
**GetCurrentView** Get Current opened view
**GoBack** Close current view and show previewsly opened view
**GoHome** Close Current view and open Home page
**GetWrapper** Get Coroutine Wrapper of UI Container
**GoHome** Close Current view and open Home page

Base View / IBaseView:

Method Usage
**SetAsGlobalView** Set view as interscenic
**ShowView** Show View with animation or without
**HideView** Hide View with animation or without
**ToggleView** Toggle View with animation or without
**IsVisible** Get View Visibility State
**OnViewAwake** Awake method alternative for view
**OnViewStart** Start method alternative for view
**OnViewDestroy** OnDestroy method alternative for view

Join Community

Support Me

You can support the development and updating of libraries and assemblies by dropping a coin:

Bitcoin (BTC)bc1qef2d34r4xkrm48zknjdjt7c0ea92ay9m2a7q55
Etherium (ETH)0x1112a2Ef850711DF4dE9c432376F255f416ef5d0
Boostyhttps://boosty.to/devsdaddy