void OnDisable() { if (DontDestroy && Instance == this) { Instance = null; } }
void Awake() { if (Instance != null) { DestroyImmediate(this.gameObject); return; } if (DontDestroy) { Instance = this; DontDestroyOnLoad(this.gameObject); } }
void Awake() { if (Instance != null) { DestroyImmediate(this.gameObject); return; } if (DontDestroy) { Instance = this; DontDestroyOnLoad(this.gameObject); } if (EventsIn) { PhotonNetwork.NetworkingClient.LoadBalancingPeer.TrafficStatsEnabled = true; } }