public void CloseTab() { if (currentTabData.Removable) { if (tabRow.childCount < 2) { chatRegister.DeleteChatWindow(this); return; } Destroy(currentTabData.Tab.gameObject); SelectNextTab(currentTabData.Tab.gameObject); StartCoroutine(UpdateCurrentDataTabNextFrame()); } }
public void CloseTab() { // If the current tab can't be closed and there are no other tabs, hide the entire window instead. if (!currentTabData.Removable && tabRow.childCount < 2) { ToggleChatWindowUI(); } if (currentTabData.Removable) { if (tabRow.childCount < 2) { chatRegister.DeleteChatWindow(this); return; } Destroy(currentTabData.Tab.gameObject); SelectNextTab(currentTabData.Tab.gameObject); StartCoroutine(UpdateCurrentDataTabNextFrame()); } }