I stuck somewhere in Unity Networking using Pun
Options
I have made game and then creating the room to play 2 player game.
Everything works fine but if player 1 restart the game and then again tries to connect to multiplayer game then player is getting an error
ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: Connected
UnityEngine.Debug:LogWarning(Object)
PhotonNetwork:ConnectUsingSettings(String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1138)
NetworkManager:Start() (at Assets/Scripts/Networking/NetworkManager.cs:24)
So problem is that Current state of networking is connected due to which it cannot re-connect.
Please help me regarding this problem.. Waiting for solution...
Everything works fine but if player 1 restart the game and then again tries to connect to multiplayer game then player is getting an error
ConnectUsingSettings() failed. Can only connect while in state 'Disconnected'. Current state: Connected
UnityEngine.Debug:LogWarning(Object)
PhotonNetwork:ConnectUsingSettings(String) (at Assets/Photon Unity Networking/Plugins/PhotonNetwork/PhotonNetwork.cs:1138)
NetworkManager:Start() (at Assets/Scripts/Networking/NetworkManager.cs:24)
So problem is that Current state of networking is connected due to which it cannot re-connect.
Please help me regarding this problem.. Waiting for solution...
0
Answers
-
How do you restart the game? Log client states while restarting. Client either does not disconnect or connects automatically somewhere before you call Connect explicitly0