Hello Everyone! I am newbie in learning photon . I reached on learning PUN Basics Tutorials in 4th topic
(4 - Game Manager & Levels).
There at last portion a boolean is used "isConnecting" for stopping re-enter in the same scene.
I have one question cant we use PhotonNetwork.Disconnect() in LeaveRoom() function
instead of using isConnecting boolean variable.
if (isConnecting)
{
PhotonNetwork.JoinRandomRoom();
isConnecting = false;
}
instead of this what if I use
public void LeaveRoom()
{
PhotonNetwork.LeaveRoom();
PhotonNetwork.Disconnect();
}
(4 - Game Manager & Levels).
There at last portion a boolean is used "isConnecting" for stopping re-enter in the same scene.
I have one question cant we use PhotonNetwork.Disconnect() in LeaveRoom() function
instead of using isConnecting boolean variable.
if (isConnecting)
{
PhotonNetwork.JoinRandomRoom();
isConnecting = false;
}
instead of this what if I use
public void LeaveRoom()
{
PhotonNetwork.LeaveRoom();
PhotonNetwork.Disconnect();
}