This question was
closed May 17, 2018 at 06:42 AM by
Kelyy_ for the following reason:
The question is answered, right answer was accepted
Question by
Kelyy_ · May 16, 2018 at 07:00 PM ·
networkingc #
How can i get error when failed connect to server?
How to display connection error on Debug.Log?
I really don't have idea how to make it, i tryied to use OnFailedConnect but it doesn't work.
Comment
Best Answer
Answer by Kelyy_ · May 17, 2018 at 06:42 AM
I make it, here is code:
public void JoinGame()
{
NetworkClient client = NetworkManager.singleton.StartClient();
client.RegisterHandler(MsgType.Disconnect, ConnectionError);
}
public void ConnectionError(NetworkMessage netMsg)
{
Debug.Log("connection error");
Debug.Log(netMsg);
}
Follow this Question
Related Questions
Multiplayer Variable System 0 Answers
Inconsistent spawning between editor and build client 1 Answer
Help with selecting objects through raycast in multiplayer game 0 Answers
Is there any way to do automatic p2p matchmaking system via Unet? 0 Answers
[Hololens] Connecting using Unity's UNET doesn't work after the first time connecting 1 Answer