Beispiel #1
0
    private void OnClickJoinRoom(string key)
    {
        if (!discoveredServers.ContainsKey(key))
        {
            return;
        }
        MyServerResponse info = discoveredServers[key];

        if (info == null)
        {
            return;
        }
        roomListPanel.SetActive(false);
        playerListPanel.SetActive(true);
        roomName.text = $"[{info.name}的房间]";
        NetworkManager.singleton.StartClient(info.uri);
        networkDiscovery.StopDiscovery();
    }