Exemplo n.º 1
0
    void OnDisconnected()
    {
        m_readStream.Position = 0;
        m_readStream.SetLength(0);
        if (m_tcpClient != null)
        {
            m_tcpClient.Close();
        }
        m_tcpClient    = null;
        m_dataSender   = null;
        m_dataReceiver = null;

        GetComponent <ScreenStream>().OnDisconnect();
        m_webCamStreamer.OnDisconnect();
    }
    void OnDisconnected()
    {
        m_readStream.Position = 0;
        m_readStream.SetLength(0);
        if (m_tcpClient != null)
        {
            m_tcpClient.Close();
        }
        m_tcpClient    = null;
        m_dataSender   = null;
        m_dataReceiver = null;

        GetComponent <ScreenStream>().OnDisconnect();
        m_webCamStreamer.OnDisconnect();

        RestoreAppStartupState();

#if UNITY_TVOS && !UNITY_EDITOR
        UnityEngine.tvOS.Remote.allowExitToHome = true;
#endif
    }