// Use this for initialization void Start() { if (tabOnStart != null) { UI_MenuTabTabButton tabButtonScpt = tabOnStart.GetComponent <UI_MenuTabTabButton>(); if (tabButtonScpt != null) { tabButtonScpt.ShowPanel(); } } }
public void CloseTab() { if (openTab != null) { UI_MenuTabTabButton tabButtonScpt = openTab.GetComponent <UI_MenuTabTabButton>(); if (tabButtonScpt != null) { tabButtonScpt.HidePanel(); } openTab = null; } }
public void OpenTab(GameObject newTab) { if (openTab != null && openTab != newTab) { UI_MenuTabTabButton tabButtonScpt = openTab.GetComponent <UI_MenuTabTabButton>(); if (tabButtonScpt != null) { tabButtonScpt.HidePanel(); } } openTab = newTab; }