RPC removable understanding

Hey everybody, how do I properly remove buffered RPC's from my photonview/player?
Because I'm doing it, but as soon as I call another buffer after it results in an error.

At first I thought it was just the buffer having issues, so i commented out the the removable of the PhotonNetwork.RemoveRPcs and it worked again.

So is there some proper process to remove the RPC's and then buffer another RPC after? Below is how I'm doing it now.


if (myView.isMine) {
PhotonNetwork.RemoveRPCs (myView);
}
myView.RPC ("SwitchWeaponOverNetworkDown", PhotonTargets.AllBuffered, weaponIndex);

Comments

  • Eh it's fine guys, I found another work around.
    I just decided to store the weapons I want synced in the player properties, then just send an RPC to all of the current weapon in properties.

    Seems to work fine.