Skip to content

This plugin helps to maintain the UI and flow of the Game/App. This works in Screen-To-Screen manner, Easy to use and handle all Dialog, Screens easily in your Game/App.

License

Notifications You must be signed in to change notification settings

deveshbeniwal/Unity-UI-Screen-Controller

Repository files navigation

Unity-UI-Screen-Controller

This plugin helps to maintain the UI and flow of the Game/App. This works in Screen-To-Screen manner, Easy to use and handle all Dialogs/Screens easily in your Game/App.

Installation

You can download and install this with different methods given below:

  • Clone/Download this repository and move the Unity_UIScreenController folder in to your project Assets folder.
  • (via Package Manager) add the following line to Packages/manifest.json or you can direct copy paste the below url in Package Manager/Add Packages From GIT Url
      https://github.com/deveshbeniwal/Unity-UI-Screen-Controller.git

How to

  • Step 1: Go to Window/Unity UI Screen Controller
  • Step 2: Add Screen/Dialog name in the list named AllScreens.
  • Step 3: Click on Update button below the screen names list.
  • Step 4: You can find the new generated script in Assets/Scripts/Screens/Screen-{ScreenName}
  • Step 5: Attach this script to that screen gameobject you prepared.
  • Step 6: Again go to to Window/Unity UI Screen Controller and hit the button Add/Update UI Screen Manager, this is create a new GameObject to current scene and Assign all the available screens to it automatically.
  • Step 7: When Adding/Deleting and screen, you must have to hit the Add/Update UI Screen Manager button to make sure every screen assing to manager properly.
  • Step 8: Choose the first screen and manually call:
      USC_ScreenManager.Instance.Process_FirstScreen();
    to process the first screen you selected.
  • Step 9: Now you can Switch, Show, Hide to your UI Screens by Simply using the methods
    • For Switching
          USC_ScreenManager.Instance.Switch(USC_SCREENS.MENU, USC_SCREENS.GAME);
    • To Show
          USC_ScreenManager.Instance.Show(USC_SCREENS.MENU);
    • To Hide
          USC_ScreenManager.Instance.Hide(USC_SCREENS.MENU);

Notes

  • You can edit the USC_BaseScreen.cs script to make animations to your UI switching.
  • All the new generated screen is inherited from USC_BaseScreen class, so you can use the override methods to make UI updation like, Show(), Hide(), ShowCompleted(), HideCompleted().
  • Whenever you hit the update button in window then a json file is updated to maintain the data! Please do not change or override it, as it may cause errors!
  • Please do not change the Generated screen scripts location!
  • Please do not use the same name in screen list.
  • Try to add screens in CAPITAL LETTERS only.

Licence

MIT License

Contact

Email: [email protected] LinkedIn: Connect

About

This plugin helps to maintain the UI and flow of the Game/App. This works in Screen-To-Screen manner, Easy to use and handle all Dialog, Screens easily in your Game/App.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages