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.

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

ramonmelo
2022-03-31 09:23:51

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