Beispiel #1
0
        void OnDisable()
        {
            tcpServer.StopListening();

            singleton = null;

            //Debug.Log("[OVRSystemPerfMetricsTcpServer] server destroyed");
        }
Beispiel #2
0
        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;
        }