Skip to content

AirCoder89/Experiment-Unity-AMVC-Design-Pattern

Repository files navigation

AMVC for UI Unity projects

The best architecture to create Unity project based on Canvas and is flexible enough to be implemented even on top of ECS or OOP.

This is a sample project I have made to demonstrate the AMVC architecture. It consists of two scene:

  1. Loading Scene : when we send few requests to fill our models with the necessary data. The loading system based on Command Design Pattern to make it flexible when we need to reload or skip some thing or even to handle errors more efficiently. and the DataBaseManager is a helper class I made it on top of Rest Client for Unity plugin.
  2. Main Scene : I consume the Api result with two different ways to explain how the Controller (Systems) and Views (Panels) communicate.

Also you will notice that all my UI Panels are a canvases. and the reason to use multiple canvases is to avoid regenerates the meshes when UI elements change Read More about it

The Application Model View Controller (AMVC) solve any dependencies issues by splits the software into :

  • Single entry point "Application" : contains and manage all critical instances and application-related data.
  • Three major components:
  1. Models : Data CRUD.
  2. Views : UI Panels (Canvas Component).
  3. Controllers : Application systems.

Amvc

Single Entry Point

entryPt

Dependencies

we can get access to any panel/system from anywhere! with GetPanel<T> and GetSystem<T> we can get a reference easily.

Get

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages