PhotonTargets.AllBufferedViaServer not for master switch

Options
Hi,

am trying to buffer RPC's so all new people into the room get them.

Master creates a "race" with a number of variables sent to other players via RPC.
1. Master raises the RPC's using AllBufferedViaServer ... ok
2. others joining room receive RPC's ... ok
3. someone remains in the room
4. Master then leaves the room, master switches correctly,
5. if the old master rejoins the room, they don't get the original RPC's. ... why?

I also use PhotonNetwork.RemoveRPCs(pvScene); to clear the RPC's before starting a new race, seems to work correctly but mentioned in case the problem is related.

It appears that AllBufferedViaServer is acting like AllBuffered as per docs: https://doc-api.photonengine.com/en/pun/current/group__public_api.html

thanks for any input
Kingsley

Comments

  • vadim
    Options
    Hi,

    What is the object these RPC's are sent through? If this is plain non-scene object, it's destroyed as player lefts the room. You need to use scene object to preserve it and it's RPC's
  • blattepop
    Options
    Hello. I am using a scene object with a Photon View set to Takeover. I am having the same issue...
  • kingsley
    Options
    Thanks Vadim, I will explore that aspect a bit more.
  • mldoc
    Options
    Was this problem ever solved? I have the same situation as kingsley in his first post.
    The difference is, the first MasterClient creates a Scene Object and calls AllBufferedViaServer Rpc's on it. If the original Master leaves, the scene object ownership change is successful, but the original buffered RPC's are gone and stop getting called when new players arrive. Note, that the scene object is not destroyed.

    Any help with this is appreciated.
  • I am currently facing the same issue!
    Any news?
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @mldoc @PieterAlbers,

    Did you try creating rooms with RoomOptions.CleanupCacheOnLeave = false?
  • LucasSQ
    Options
    Hi,
    Sorry for reviving such an old thread but I'm facing the same issue. I have a photon view component in my scene and after the master client creates and joins the room an rpc is excetuted on it, with RpcTarget.AllBufferedViaServer.
    When someone else joins the room while the original master client is connected, the rpc is excecuted for them as expected.
    After the original master client leaves, a different player is selected as master client (as expected).
    But when someone else joins the room now, the rpc is not excecuted anymore for them.

    (I also tried this with
    RoomOptions.CleanupCacheOnLeave = false
    
    as @JohnTube suggested, but to no effect.)

    Since this thread has been inactive for so long I'm kind of expecting this to be by design. But maybe there is a different approach I can use to get around this?