Is there a way to handle re-connection in Fusion or do we have to handle it manually?
The whole answer can be found below.
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).
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
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