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.
ImmediateSelect
bool
Open the tab immediately if the tab header is under focus (gameobject selected by EventSystem), useful in a keyboard or gamepad navigation.
CanSelectTab
Func<Tab, bool>
Function to check is tab can be selected.
Events
OnTabSelect
UnityEvent<int>
Receive index of the selected tab.
TabsScroll
The component is attached to the Header container. Used to toggle tabs with mouse scroll.
Select tab
Tabs.SelectTab(Tabs.TabObjects[0]);
Enable tab
Tabs.EnableTab(Tabs.TabObjects[0]);
Disable tab
Tabs.DisableTab(Tabs.TabObjects[0]);