protected virtual void OnEnable() { if (Instance != this) { Debug.LogError("PhotonHandler is a singleton but there are multiple instances. this != Instance."); return; } this.Client = PhotonNetwork.NetworkingClient; if (PhotonNetwork.PhotonServerSettings.EnableSupportLogger) { SupportLogger supportLogger = this.gameObject.GetComponent <SupportLogger>(); if (supportLogger == null) { supportLogger = this.gameObject.AddComponent <SupportLogger>(); } if (this.supportLoggerComponent != null) { if (supportLogger.GetInstanceID() != this.supportLoggerComponent.GetInstanceID()) { Debug.LogWarningFormat("Cached SupportLogger component is different from the one attached to PhotonMono GameObject"); } } this.supportLoggerComponent = supportLogger; this.supportLoggerComponent.Client = PhotonNetwork.NetworkingClient; } this.UpdateInterval = 1000 / PhotonNetwork.SendRate; this.UpdateIntervalOnSerialize = 1000 / PhotonNetwork.SerializationRate; PhotonNetwork.AddCallbackTarget(this); this.StartFallbackSendAckThread(); // this is not done in the base class }