TimeoutDisconnect - PeerCreated
Hi guys! I just started using (or trying to use ) Photon Unity Networking with Unity 5, and when I play the game it sits on ConnectingToNameServer, then it gives me a TimoutDisconnect warning in the console and switches to the PeerCreated state.
Here's the TimeoutDisconnect error:
TimeoutDisconnect while connecting to: ns.exitgamescloud.com:5058. Check if the server is available.
UnityEngine.Debug:LogWarning(Object)
NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1579)
ExitGames.Client.Photon.EnetPeer:SendOutgoingCommands()
ExitGames.Client.Photon.PhotonPeer:SendOutgoingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:103)
I'm following a tutorial by Quill18Creates. It seems others have had this issue in the past.
https://www.youtube.com/watch?v=mLAilMkRxYU&list=PLbghT7MmckI7BDIGqNl_TgizCpJiXy0n9&index=4
Here's the code:
Thanks for any help you can provide. Cheers!
Here's the TimeoutDisconnect error:
TimeoutDisconnect while connecting to: ns.exitgamescloud.com:5058. Check if the server is available.
UnityEngine.Debug:LogWarning(Object)
NetworkingPeer:OnStatusChanged(StatusCode) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/NetworkingPeer.cs:1579)
ExitGames.Client.Photon.EnetPeer:SendOutgoingCommands()
ExitGames.Client.Photon.PhotonPeer:SendOutgoingCommands()
PhotonHandler:Update() (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonHandler.cs:103)
I'm following a tutorial by Quill18Creates. It seems others have had this issue in the past.
https://www.youtube.com/watch?v=mLAilMkRxYU&list=PLbghT7MmckI7BDIGqNl_TgizCpJiXy0n9&index=4
Here's the code:
using UnityEngine; using System.Collections; public class NetworkManager : MonoBehaviour { private bool once = false; private void Start () { PhotonNetwork.logLevel = PhotonLogLevel.Full; Connect(); } private void Connect () { //PhotonNetwork.offlineMode = true; PhotonNetwork.ConnectUsingSettings("Version1"); //the bit in the quotes can be anything really. I just makes sure you get connected only with people who have the same version. //SpawnMyPlayer(); } private void OnGUI () { GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString()); // if(PhotonNetwork.connectionStateDetailed.ToString() == "PeerCreated" && !once) // { // SpawnMyPlayer(); // once = true; // } } private void OnJoinedLobby () //isn't working because I still get the peerCreated stuff I guess { Debug.Log("OnJoinedLobby"); PhotonNetwork.JoinRandomRoom(); //PhotonNetwork.CreateRoom(playerRoomName); //example of creating a room with a player specified name } private void OnPhotonJoinFailed () //runs if PhotonNetwork.JoinRoom() fails. Doesn't work for PhotonNetwork.JoinRandomRoom(). { Debug.Log("OnPhotonJoinFailed"); PhotonNetwork.CreateRoom(null); //creates a room with no name } private void OnPhotonRandomJoinFailed () { Debug.Log("OnPhotonRandomJoinFailed"); PhotonNetwork.CreateRoom(null); } private void OnJoinedRoom() { Debug.Log("OnJoinedRoom"); SpawnMyPlayer(); } private void SpawnMyPlayer () { //Instantiate(playerPrefab); //the problem with doing something like this is that instantiate only creates something on your computer and not anyone else's. PhotonNetwork.Instantiate("PlayerController", Vector3.zero, Quaternion.identity, 0); } }
Thanks for any help you can provide. Cheers!
0
Comments
-
Hi,
Does the problem with connection to ns.exitgamescloud.com:5058 still persist? It might be due server temporal outage but should not last for long.0 -
Hello and thank you for your response. I just tried again, and the problem is sill there. I have tried to connect a few times over the course of about 3 weeks, each time with the same result.0