What does PhotonNetwork.IsConnected exactly mean?

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

What does PhotonNetwork.IsConnected exactly mean?

Kurdiez
2020-02-22 15:11:40

PhotonNetwork.IsConnected boolean is true if you are connected the Name Server or the regional Master Server?

Comments

roycefernandes3
2020-04-11 08:16:05

Tells if we are already connected to Photon

JohnTube
2020-04-12 08:36:57

Hi @Kurdiez,

Thank you for choosing Photon!

        /// <summary>Returns if this client is currently connected or connecting to some type of server.</summary>  
        /// <remarks>This is even true while switching servers. Use IsConnectedAndReady to check only for those states that enable you to send Operations.</remarks>  
        public bool IsConnected { get { return this.LoadBalancingPeer != null && this.State != ClientState.PeerCreated && this.State != ClientState.Disconnected; } }
Back to top