Example #1
0
        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);
            }
        }
Example #2
0
 public void CloseDialog()
 {
     ControlTabs.CloseTab(Type, Provider);
 }