Clientdisconnected due to error: Timeout and Ready with no player

Asked

Viewed 63 times

0

Hello, I have a connection problem in my multiplayer project. When creating a local match, everything seems to work fine, however, the console displays the following warnings Ready with no player object e playerControllerId: 0

when I build and create the start by cell phone, and try to enter it by computer (which is in the same network), I get an error of timeout

Client disconnected due to error timeout

I’ve tried everything, but the problem persists. Apparently this bug might be on creation of a host for starting.

Here’s the script I’m using to create the match:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;

public class NetworkManager_Custom : NetworkManager {

    public void StartupHost(){
        SetPort();
        NetworkManager.singleton.StartHost();
    }

    public void JoinGame(){

        SetIPAdress();
        SetPort();
        NetworkManager.singleton.StartClient();

    }

    public void SetIPAdress(){

        string ipAdress = GameObject.Find("ipInputField").transform.Find("Text").GetComponent<Text>().text;
        NetworkManager.singleton.networkAddress = ipAdress;
    }

    public void SetPort(){

        NetworkManager.singleton.networkPort = 7777;

    }

}
  • By all indications, the application is awaiting local requests (127.0.0.1), justifies the place to work, so from another IP, it is not possible. Look for exposing the application to all Ips: 0.0.0.0

  • Unfortunately, no IP seems to have worked, not even replacing local ip 127.0.0.1 with localhost.

2 answers

0

Thanks for the answers! I managed to solve this problem as follows: 1- In Network Manager, there is the possibility to change the preferred IP of the engine. 2- There you need to enter the match host ip address, which can be found in the "ipconfig" command in cmd.

Now just need to make the engine automatically find the match host ip and connect to it.

-1

  • Hello, in the case of the server port, I already switched to others that apparently were not being used. As for the log, I changed the log display to Info, so the connection information is being shown on the console. As I said earlier, the problem seems to be in selecting a host for the match.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.