How to exit from a room so that OnPlayerLeft callback is called on the local client as well?
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).
How to exit from a room so that OnPlayerLeft callback is called on the local client as well?
Siddhant
2022-03-23 09:18:16
Currently I've tried Runner.Shutdown as well as destroying all the components accept transform but in both the cases the OnPlayerLeft callback is not being invoked on the local player side (the player that just left)
Comments
Hi @Siddhant ,
That is by design, the OnPlayerLeft
is invoked only when another player leaves the Game Session.
If you want to deal with the local player disconnecting, you need to do it from either the OnShutdown
or the OnDisconnectedFromServer
callbacks, depending on which mode you are using.
--
Ramon Melo
Photon Fusion Team
Back to top