[PHOTON] How to handle a temporary connection drop?

I’m trying to handle a connection glitch - for example, when using a mobile over a wifi connection. The use case looks like this:

  • Two players connect to Photon, join a room and start play.
  • Each player constructs a hierarchy of Photon instantiated GameObjects.
  • A network glitch / delay occurs. (For testing, this means stopping the wifi; both players are running on the same PC.)
  • Wait for each session to detect the dropped connection.
  • Resolve the network connection. (For testing, this means restarting the wifi connection.)
  • Play to resume seamlessly for both players.

At step (1), both the Player and Room are given a Ttl (time to live) of 1 minute ( 60,000 ms ) :

        m_roomOptions = new RoomOptions()
            { IsVisible = true
            , IsOpen = true
            , MaxPlayers = 2
            , PlayerTtl = 60000
            , EmptyRoomTtl = 60000
            };
        PhotonNetwork.CreateRoom(sRoomName, m_roomOptions, TypedLobby.Default)

However, at step (4), the Photon instantiated objects are all being destroyed. This is happening well before the 60s Ttl expires.

How can this scenario be handled so that the GameObjects still exist at step (6) within the Ttl time frame?

Ever figure this out? Having the same issue.

If I recall correctly I had to implement my own ping mechanism but I would have to go dig out my code to confirm.

You could try something along these lines: The Photon Forum is Closed Permanently. | Photon Engine

It might be that the room is set to clean all objects when a user leaves. See this thread for how to disable that: unity game engine - PhotonNetwork.Instantiate destroying instantiated objects when owner leaves - Stack Overflow