Disconnected from game server on join

It seems that whenever I create a game and join that I immediately get disconnected with a "DisconnectingFromGameServer" state. It looks like it tries again a few times and then gives up and I end up in the lobby. I'm not sure what I changed that could cause that. What kind of things could be responsible for a behavior like that? The last thing I was doing was trying to set custom data on the localPlayer.

BTW, it looks like data for the localPlayer is cached? How can I clear that? Thanks!


  • I can't reproduce the issue here with our demo.
    Some things come to my mind to check: Are you setting a player name before you connect? Or better, do you use Custom Authentication?
    In, you can set PhotonCloud.UserId before you connect. The UserID is important to re-join games and for the list of saved games a user has.

    To have a list of saved games (and to be able to join and store one), you need to setup the App in the Dashboard.
    Click "Manage" for the app, select "WebHooks" and "add new configuration" (if there is one, edit it). Select preset "Turnbased" and "Update" it. When you have your own service ready, update the URL accordingly.

    If you want to clear the local player's custom properties, use PhotonClient.LocalPlayer.CustomProperties.Clear(). This won't affect the props that were set in games earlier but it will clear the custom props for your player in the next game.