MasterClient Application Pause

Options

Hi:

My mobile app recently meet a problem that Scene/Room Objects that maintained by MasterClient through OnPhotonSerializeView. As long as the MC working, it seems perfect fine.

Since it is mobile app, user can unexpectedly pause/ out of focus, when the master client hang and someone just join the room, those states are lost. Because of the new comer are not yet becoming master client, objects are network instantiated at the first position, last position which must be synced through OnPhotonSerializeView are lost.

Is there any method to alleviate this situation?

first thing come to my mind is to record these states in RoomProperties, is it reasonable to having husbands of scene objects in this scenario?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options

    Hi @ThomasKao_XRSpace,

    Did you take a look at our recommendations for handling this case?

    See last one at the bottom.

  • Hi:

    For the 4 "handle the background Master Client scenario"

    Are the first two to PhotonNetwork.Disconnect() or LeaveRoom() When Application.OnApplicationPause(bool)?

    I remember those two might not be finished in time at Application.OnApplicationPause. Did I have wrong concept about it?

    And for the forth, I tried PhotonNetwork.networkingPeer.StopThread(), but the paused player was still linger for a while, even when setting PhotonHandler's KeepAliveinBackground and Room's playerTtl to 0.


    For now, the last hope for me is the masterclient alive detection, I guess I will ping MasterClient onJoinRoom and takeover MasterClient if have to.