Skip to content

Latest commit

 

History

History
40 lines (36 loc) · 1.11 KB

File metadata and controls

40 lines (36 loc) · 1.11 KB

MenuView-Package

This is my simple UnityGameEngine menu management tool and I want to share it with my friends. You can Create some Menus and switch between them and manage them at multiple layers.

to do that:

  1. Import Package from Unity Package Manager by selecting Add package from git URL...
  2. Create your Menu Script as Monobehaviour
  3. Change Monobehaviour with MenuViews.MenuView
  4. Assign that to your UI GameObject.
  5. Manage your menu by some commands like ChangeCurrentView()

Example

using MenuViews;

//MainGameMenu.cs file
public class MainGameMenu : MenuView
{
    protected override void Init()
    {
        //It is MonoBehaviour, init buttons, texts, events, and more...
        throw new System.NotImplementedException();
    }
    //you have these commands in public and static
    //ChangeCurrentView<AuthMenu>();
    //ChangeToLastView();
    //LastView {get;}
    //GetCurrentView();
    //And more ...
}

//AuthMenu.cs file
public class AuthMenu : MenuView
{
    protected override void Init()
    {
        throw new System.NotImplementedException();
    }
}