How do I delete the buffer data of a specific "rpc"?

How do I delete the buffer data of a specific "rpc"?

Comments

  • Hi @SoulCastry,

    Do you mean how to delete a cached/buffered RPC so it won't be sent to new players (late joiners) or resent to rejoiners?
    Is that it?

    Do you want to clear all cached RPC calls by method name or by sender or by ViewId or a combination of these? or a specific call and not all calls?

    Why do you need this?
    What do you want to achieve with this?
  • SoulCastry
    edited September 2019
    @JohnTube

    example
    [PunRPC]
        private void AgarrarItem(int playerName)
        {
            Debug.Log("El Codigo recibido para agarrar el item es =" + playerName.ToString());
    
            string NombreJugador = PhotonNetwork.CurrentRoom.GetPlayer(playerName).NickName;
            GameObject JugadorSentado = GameObject.Find(NombreJugador);
    
            char_ItemManager player = JugadorSentado.GetComponent<char_ItemManager>();
    
            if (!player)
                return;
    
            currentOwner = player;
            col.enabled = false;
            myRb.isKinematic = true;
            player.myItemManager.GetItem(this, handtype);
            PV.TransferOwnership(playerName);
    
        }
    I just need to erase the data of the "rpc" in buffer of this method.
  • Hi @SoulCastry,

    It's not clear what you want to erase?
    what "data"?
    what "buffer"?
  • @JohnTube

    PhotonNetwork.RemoveRPCs(PhotonView);

    This eliminates the data stored in the entire photonView buffer, but what I need is to delete nothing more than the data of a specific function. Sorry, I don't speak English and I use a translator
  • SoulCastry wrote: »
    @JohnTube

    PhotonNetwork.RemoveRPCs(PhotonView);

    This eliminates the data stored in the entire photonView buffer, but what I need is to delete nothing more than the data of a specific function. Sorry, I don't speak English and I use a translator

    Bump

    This is exactly what I need
  • Please don't revive threads this old.
    State what you need in a new thread (I don't know what you refer to, because if you need PhotonNetwork.RemoveRPCs, just use it)...