Beispiel #1
0
    public void UpdateField()
    {
        int port = 0;

        P2PController c = GameObject.FindObjectOfType <P2PController>();

        if (c != null && Int32.TryParse(GetComponent <InputField>().text, out port))
        {
            c.SetMyPort(port);
        }

        MyNetworkManager m = GameObject.FindObjectOfType <MyNetworkManager>();

        if (m != null && Int32.TryParse(GetComponent <InputField>().text, out port))
        {
            m.networkPort = port;
        }
    }
Beispiel #2
0
    public void UpdateField()
    {
        P2PController c = GameObject.FindObjectOfType <P2PController>();

        c.SetMyPort(Int32.Parse(GetComponent <InputField>().text));
    }