Clearing Buffered RPCs

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Clearing Buffered RPCs

roshaan
2019-06-07 19:05:07

Hi, I have sent multiple RPCs (AllBufferedViaServer) and I wanted to know as to when they are cleared from server? Or Is there any way to clear them using some function from masterclient as per my need?

Comments

JohnTube
2019-06-10 13:08:22

Hi @roshaan,

By default (RoomOptions.CleanupCacheOnLeave = true) buffered RPCs are cleared when the player leaves the room for good.
You can manually clear buffered RPCs of course using some methods.

PhotonNetwork.OpCleanActorRpcBuffer (int actorNumber)  
PhotonNetwork.CleanRpcBufferIfMine (PhotonView view)  
PhotonNetwork.OpCleanRpcBuffer (PhotonView view)

for cached events in general:

PhotonNetwork.OpRemoveCompleteCacheOfPlayer (int actorNumber)  
PhotonNetwork.OpRemoveCompleteCache()
Back to top