private void Awake() { if (networkTabManager == null) { networkTabManager = this; } else { Destroy(this); } }
void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); // Clearing net tabs on round restart // Debug.LogError( "NTM cleanup!" ); foreach (var tab in Instance.openTabs) { Destroy(tab.Value.gameObject); } Instance.openTabs.Clear(); } }