I have a situation where if the flag is captured, an RPC is called by the master client, which invokes an event (not PUN event) on each of the clients. This event then eventually reaches a function in which the master client has to set certain room and player properties. A snippet of this code.
Only the master client reaches these lines. However, if the master client disconnects before one of those lines then the properties are never set and things go broken since events are already called on other clients (thanks to the RPC).
What would be a workaround for this problem? Can I somehow use expected values or expected users and call these SetCustomProperties on all clients. So that even if the master client disconnects, one of the other clients will still execute these functions.
PhotonNetwork.player.SetCustomProperties(new ExitGames.Client.Photon.Hashtable() { { PlayerProperty.Objective, null } });
Only the master client reaches these lines. However, if the master client disconnects before one of those lines then the properties are never set and things go broken since events are already called on other clients (thanks to the RPC).
What would be a workaround for this problem? Can I somehow use expected values or expected users and call these SetCustomProperties on all clients. So that even if the master client disconnects, one of the other clients will still execute these functions.