void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); //Killing net tabs on round restart // Debug.LogError( "ControlTabs cleanup!" ); foreach (var tab in Instance.HiddenNetTabs) { Destroy(Instance.HeaderForTab(tab.Value)?.gameObject); Destroy(tab.Value.gameObject); } foreach (var tab in Instance.OpenedNetTabs) { Destroy(Instance.HeaderForTab(tab.Value)?.gameObject); Destroy(tab.Value.gameObject); } Instance.SelectTab(ClientTabType.Stats, false); } }
public void CloseDialog() { ControlTabs.CloseTab(Type, Provider); }