Пример #1
0
    public void HostWithProxy(string address, int port, string password = "")
    {
        if (m_Client != null)
        {
            Destroy(m_Client);
        }

        if (m_Server == null)
        {
            m_Server = gameObject.AddComponent <NetworkServer>();
        }

        m_IsPlaying = true;
        if (m_Server == null)
        {
            m_Server = gameObject.AddComponent <NetworkServer>();
        }
        m_Server.Connect("server", address, port);
    }