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
Documentation

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

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.

Is there a way to handle re-connection in Fusion or do we have to handle it manually?

Siddhant
2022-04-07 05:10:21

In PUN there was a straight forward method PhotonNetwork.ReconnectAndRejoinwhich handled the player's re-connection automatically. Is there a similar way to handle player re-connection in Fusion? If not then what could be the best way to achieve it.

Comments

ramonmelo
2022-04-07 12:57:13

Hi @Siddhant ,

Currently, there is no similar API in Photon Fusion, you need to handle it manually.

The workflow would be:

If you disconnect or get disconnected, Fusion will Shutdown and invoke the OnShutdown

  • callback;

  • From there, you must dispose/destroy the old NetworkRunner instance;

  • Create a new NetworkRunner, and start it again using the same Session ID used to connect the first time.

--

Ramon Melo

Photon Fusion Team

Back to top