Beispiel #1
0
 public void ShowDefaultTab()
 {
     if (tabs.Length < 2)
     {
         this.LogError("You don't need tabs, as you added tabs less than 2");
     }
     if (tabPanels.Length < 2)
     {
         this.LogError("You don't need tab panels, as you added tab panels less than 2");
     }
     tabs[0].isOn = (defaultTab == 0 ? true : false); // without this line you need to take care from the prefab
     tabs[1].isOn = (defaultTab == 1 ? true : false);
     ShowContentOfIndex(defaultTab);
     if (onClick != null)
     {
         onClick.Invoke(defaultTab);
     }
 }
Beispiel #2
0
 void NotifyEvent()
 {
     onTabClick.Invoke(curIndex);
 }