Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by Xactly · Dec 13, 2016 at 08:50 PM · unity 5multiplayermatchmakingmatchrooms

Cannot join Internet Match

Hi, i created a simple Unity matchmaking project (see the link at the end for the complete project) in which player is instantiated and their respective names are shown above their gameObjets. The problem is when i create the match it works fine and loads the scene, instantiates the player from prefab, shows the name Everything is looking good. But when on another build i join the same match First of all it takes too long and then simply disconnects and fails to join the match and thows the following error:

MatchMakingClient DropConnection :https://mm.unet.unity3d.com/json/reply/DropConnectionRequest UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

followed by:

ClientDisconnected due to error: Timeout UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate()

and when i again try to find the match there is no match The match just disappears but on the other build everything is still good !!!????.

I am using Unity 5.5.0f3

Here is the Link to the project: http://www25.zippyshare.com/v/itzvxmq6/file.html

This is the player script:

Player.cs

 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 using UnityEngine.Networking;
 
 [System.Serializable]
 public class PlayerData
 {
     public string myName;
     public GameObject myObject;
 
     public PlayerData(string n, GameObject g)
     {
         myName = n;
         myObject = g;
     }
 
     public PlayerData()
     {
 
     }
 }
 
 public class Player : NetworkBehaviour {
 
     private PlayerSetup playerSetup;
 
     [SerializeField]
     private GameObject myCanvas;
 
     [SyncVar]
     public string myName = "PLAYER";
 
     [SerializeField]
     Text nameText;
 
     [SerializeField]
     private float speed = 2f;
 
     [SerializeField]
     RectTransform myTransform;
 
     [SerializeField]
     private GameManager gameManager;
 
     PlayerData myData;
 
     void Start()
     {
         myCanvas = GameObject.FindGameObjectWithTag("PlayerCanvas");
         gameManager = FindObjectOfType<GameManager>();
 
         if (isLocalPlayer)
         {
             playerSetup = FindObjectOfType<PlayerSetup>();
             myData = new PlayerData(playerSetup.playerName, gameObject);
             CmdPlayerHasJoined(myData);
             GetComponent<Image>().color = Color.blue;
             nameText.color = Color.green;
         }
         else
             nameText.color = Color.red;
 
         nameText.text = myName;
 
         transform.SetParent(myCanvas.transform);
     }
 
     [Command]
     public void CmdPlayerHasJoined(PlayerData myData)
     {
         RpcPlayerHasJoined(myData);
         gameManager.players.Add(this);
         gameManager.playersName.Add(myName);
     }
 
     [ClientRpc]
     public void RpcPlayerHasJoined(PlayerData myDataa)
     {
         myName = myDataa.myName;
         nameText.text = myName;
         gameManager.players.Add(this);
         gameManager.playersName.Add(myName);
     }
 
     void Update()
     {
         if (!isLocalPlayer)
             return;
 
         Vector2 move = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));
         myTransform.Translate(move * speed * Time.deltaTime);
     }
 
 }
 

This is the player setup script:

PlayerSetup.cs

 using UnityEngine;
 using UnityEngine.UI;
 
 public class PlayerSetup : MonoBehaviour {
 
     public static PlayerSetup instance;
 
     public string playerName = "PLAYER";
     [SerializeField]
     private Text playerNameInput;
     [SerializeField]
     private GameObject networkHud;
 
     void OnLevelWasLoaded()
     {
         if(UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "Menu")
         {
             Button setButton = GameObject.Find("SetButton").GetComponent<Button>();
             setButton.onClick.AddListener(SetPlayerName);
             setButton.onClick.AddListener(SetPlayerName);
 
             playerNameInput = GameObject.Find("PlayerNameText").GetComponent<Text>();
             networkHud = GameObject.Find("NetworkManager");
         }
     }
 
     void Awake()
     {
         if (instance == null)
         {
             DontDestroyOnLoad(this);
             instance = this;
         }
         else
             Destroy(gameObject);
     }
 
     public void SetPlayerName () {
         playerName = playerNameInput.text;
         networkHud.SetActive(true);
     }
     
 }
 








Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by ludos · Dec 14, 2016 at 04:48 PM

i have switched to unity 5.5.0f3 as well and now get the same error with a previously working networking setup. however i dont use matchmaking. the client is connected already and it is receiving data, but shortly after it gets disconnected. could be that i am missing something on the server to keep the connection up, or the client would need to send something...

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Xactly · Dec 14, 2016 at 05:54 PM 0
Share

Are you using LAN?

can you also provide your networking scripts so that i can tell whats the issue more efficiently.

avatar image
0

Answer by pavan123 · Feb 16, 2017 at 06:58 AM

Hi i am facing the same error: Client Disconnected due to error: Timeout UnityEngine.Networking.NetworkIdentity:UNetStaticUpdate() I have this issue when using matchmaker whereby my client kicked off the server approximately 50sec and every time got this error.If you find any solution to resolve that error kindly revert back to me.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

148 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UNET with Secure Firewalls 0 Answers

uNet: Failed to send internal buffer 0 Answers

MatchInfoSnapshot currentSize returns 1 instead of 0 0 Answers

No 'Access-Control-Allow-Origin' in webGL Unity Multiplayer 1 Answer

Managed to set up Multiplayer Online on one Computer, but not on 2 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges