Quantcast
Channel: Photon Unity Networking (PUN) — Photon Engine
Viewing all articles
Browse latest Browse all 8947

PhotonNetwork.Disconnect()

$
0
0
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();
}

Viewing all articles
Browse latest Browse all 8947

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>