void OnDisable() { tcpServer.StopListening(); singleton = null; //Debug.Log("[OVRSystemPerfMetricsTcpServer] server destroyed"); }
void OnEnable() { if (singleton != null) { Debug.LogError("Mutiple OVRSystemPerfMetricsTcpServer exists"); return; } else { singleton = this; } if (Application.isEditor) { Application.runInBackground = true; } tcpServer.StartListening(listeningPort); }
void OnDisable() { tcpServer.StopListening(); singleton = null; }