Giter VIP home page Giter VIP logo

easy_ui_nav's Introduction

Easy UI Nav - Make Unity UI Navigation Easier

EasyUINav is a program made with allowing for easier UI navigation. Gone are the days of spending time working on and configuring complex navigation setups manually. With EasyUINav, streamline your Unity UI navigation process effortlessly. Simply create a new navigation element by clicking the plus sign, then drag and drop a button to the "User Chosen" button slot, and assign the appropriate game objects to the enable and disable lists. Need to start fresh? Just click "reinitialize" to reset the lists and start anew. Save time and effort with EasyUINav, your go-to solution for simplified UI navigation in Unity.

Contains; Unity Package with all code and a dirt simple sample scene

Note, this is all HUMAN generated, dapper language /= GPT

UINav Demo

Support me on Patreon

Features

  • Effortless UI Navigation: EasyUINav simplifies Unity UI navigation, eliminating the need for manual configuration.

  • Intuitive Setup: Create navigation elements effortlessly by clicking the plus sign and dragging buttons to the designated slots.

  • Customization Made Easy: Easily set UI actions with a simple drag and drop system.

  • Reset with Ease: Need to start over? Click "reinitialize" to reset lists and begin anew, saving time and streamlining your workflow.

  • Easily view all functions within a script and call void ones by simply clicking a boolean (Coming in v1.2, a singular error stops me currently)

  • To use the sample scene, please ensure TMP is installed! Upon clicking the scene with any new Unity version you should automatically see the TMP download window open!


Easy UI Nav

How to Use EasyUINav for Simplified UI Navigation in Unity

Easy UI Nav Expanded

Installation:

  1. Download EasyUINav from the Unity Asset Store (Soon) or import it into your project from a package.
  2. Once imported, you'll find EasyUINav accessible from the Unity editor as a component!

Creating a New Navigation Element:

  1. Open EasyUINav in the Unity editor.
  2. Click the plus sign (+) to create a new navigation element.

Assigning Buttons:

  1. Drag and drop a UI button from your scene hierarchy into the "User Chosen" button slot in the EasyUINav interface.

Configuring Navigation Paths:

  1. Identify the game objects that should be enabled or disabled when navigating between UI elements.
  2. Drag these game objects into the corresponding "Enable" and "Disable" lists in the EasyUINav interface.

If you need to start over or make changes, simply click the "reinitialize" button to reset the lists and begin fresh.

Testing and Iteration:

Playtest your UI navigation in the Unity editor to ensure everything works as expected. Iterate on your navigation setup as needed, making adjustments for optimal user experience.

More Technical Explanation

Easy UI Nav

This script, Easy_UI_Nav, is designed to simplify UI navigation in Unity. Let's break down its components:

  1. Public Variables:

    • NavName: A string variable to hold the name of the navigation.
    • navs: A list of UINavigator objects. Each UINavigator represents a UI navigation setup.
  2. UINavigator Class:

    • UserChosenButton: A reference to the button that triggers the navigation.
    • ItemsToEnable: A list of game objects to enable when the button is clicked.
    • ItemsToDisable: A list of game objects to disable when the button is clicked.
    • The constructor initializes these properties.
  3. Awake Method:

    • Iterates through each UINavigator in the navs list.
    • Adds listeners to the UserChosenButton of each UINavigator.
    • When the button is clicked, it enables objects in ItemsToEnable and disables objects in ItemsToDisable.
  4. EnableAll and DisableAll Methods:

    • Enable or disable all game objects in the provided lists.
  5. RunMethods Method:

    • Not currently used in the provided script.
  6. ObservedList Class:

    • A generic list implementation with additional events for tracking changes.
    • It provides functionality similar to ObservableCollection in C#. Becomes more important in 1.2.
  7. Custom Editor (Easy_UI_NavEditor):

    • Extends the Unity Editor class to customize the appearance of Easy_UI_Nav in the Unity Inspector.
    • Provides a button to clear the lists of ItemsToEnable and ItemsToDisable for each UINavigator when clicked.
  8. KeyValue Class:

    • A generic class to hold key-value pairs, used for serialization purposes.

Overall, this script facilitates UI navigation by allowing you to define button-click behaviors that enable/disable specific UI elements associated with each button. The ObservedList class adds functionality to track changes to lists, and the custom editor provides a convenient way to manage UI navigation setups within the Unity Editor.

License

Apache 2

easy_ui_nav's People

Contributors

tktswalker avatar

Stargazers

Edwin Zaniar Putra avatar SPHYNX avatar zyzyx avatar Artur Nasiadko avatar Corrie  avatar Sai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.