Tabs
Options
Container
TransformContainer for the tabs buttons.
DefaultTabButton
ButtonButton template for the inactive tabs.
ActiveTabButton
ButtonButton for the active tab.
TabObjects
Tab[]Tabs array, contains names and references to the tabs gameobjects.
Tabfields:Name
stringTabObject
GameObject
DefaultTabName
stringName of the tab opened by default.
KeepTabsActive
boolIf true does not deactivate hidden tabs.
ImmediateSelect
boolOpen the tab immediately if the tab header is under focus (gameobject selected by EventSystem), useful in a keyboard or gamepad navigation.
Animation
boolAnimate tabs change.
AnimationDuration
floatAnimation duration.
UnscaledTime
boolRun animation with unscaled time.
CustomAnimation
Func<AnimationData, IEnumerator>Custom animation to use instead of default one.
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]);