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; }