Skip to content

Unity UI tab menus.

License

Unlicense, MIT licenses found

Licenses found

Unlicense
LICENSE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

b3x206/unity-tabsystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Tab System

CodeFactor

Use this tab system to easily create tabs in your UI. (like the browser tabs or menu tabs)

Notes :

Before usage, make sure to import TextMeshPro text.

How To Import

Preview :

Scene Scene

Font Used In The Previews

Code :

// Reference to the tab system.
public TabSystem tabSystem;

void Start()
{
    // Register event
    tabSystem.OnTabButtonsClicked.AddListener(EventExample);
    // Sets current selected tab to index (if the index exists)
    tabSystem.SetSelectedButtonIndex(2);
    // Sets tab button amount (this generates tabs if the count isn't already 4)
    tabSystem.TabButtonAmount = 4;
}

// ...
// Register this event from inspector if you want, using the unity event.
public void EventExample(int SelectedTabIndex)
{
    // Information
    Debug.Log(string.Format("Selected tab was : {0}", SelectedTabIndex));
    // Toggle menus from here.
}

Documentation :

  • Documentation will be added as a wiki page, but this is the quick start thing.
  • Create tab using GameObject>UI>TabSystem
  • Just play with the 'TabAmount' and use the 'CurrentReferenceTabIndex' variable for which tab to instantiate from.
  • Use the inspector (like you would do on a GameObject>UI>Button) to attach events and change stuff to your liking.

Licensing :

This repository is dual licensed to be both unlicense/public domain and/or MIT license. Use the one that is suitable for you and your organization.

About

Unity UI tab menus.

Topics

Resources

License

Unlicense, MIT licenses found

Licenses found

Unlicense
LICENSE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages