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! Your search result can be found below. Plus, we offer support via these channels:

Try Our

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.

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.

Disconnected after change the scene, but DisconnectCause is just None.

2021-07-02 15:10:19

When the game is over, all clients back to the previous scene.

However, when the scene is loaded, all clients instantly disconnected immediately without any reason.

Before I updated PUN 2 to the latest version, the DisconnectCause was DisconnectByClientLogic, but after the update, DisconnectCause changed to None.

I don't think it's an intended feature, what causes the disconnection? I want to keep players stay in the same room so that they can play right after the previous game is done.

Using Unity 2019.4.3f1 and PUN 2.33 lib, updated yesterday.


2021-07-03 09:38:55

It's been 4 days since I struggling with this issue, anybody help?

I changed my code to synchronize the scene from RaiseEvent to using "PhotonNetwork.AutomaticallySyncScene = true;" instead, now I got this error message has shown up in my console:

There is no code for leaving the room in my scripts, and I put the Debug.Log every line of code where it calls PhotonNetwork.Disconnect() and there was none of them invoked from my code.

Seriously, just tell me if it's an intended feature, then I'll change the workflow to something different. Otherwise, what causes the force disconnection?

2021-07-05 02:22:58


2021-07-06 15:19:18

PUN does not disconnect clients when you load scenes. There is a thread keeping connections up for a while, if Unity doesn't call Update (and related methods) while loading.
Still you may be running into a disconnect (timeout or due to flooding the server's receive and send buffers).
Do you send a lot when you switch scenes?

There is a Master Server for matchmaking and several Game Servers for actual game play. When you leave a room, this triggers switching servers under the hood.
This is why you should wait for the callback OnConnectedToMaster after calling LeaveRoom.

In your case, it seems that some script in the new scene sets a property for the room but your client no longer is in any.

You could enable the SupportLogger (in PhotonServerSettings) and send us the log to: [email protected]

Back to top