Tabs

Options

  • Container Transform

    Container for the tabs buttons.

  • DefaultTabButton Button

    Button template for the inactive tabs.

  • ActiveTabButton Button

    Button for the active tab.

  • TabObjects Tab[]

    Tabs array, contains names and references to the tabs gameobjects.

    Tab fields:

    • Name string

    • TabObject GameObject

  • DefaultTabName string

    Name of the tab opened by default.

  • KeepTabsActive bool

    If true does not deactivate hidden tabs.

  • CanSelectTab Func<Tab, bool>

    Function to check is tab can be selected.

Events

  • OnTabSelect UnityEvent<int>

    Receive index of the selected tab.

Select tab

Tabs.SelectTab(Tabs.TabObjects[0]);

Enable tab

Tabs.EnableTab(Tabs.TabObjects[0]);

Disable tab

Tabs.DisableTab(Tabs.TabObjects[0]);