PhotonNetwork.RemoveAllBufferedMessages C# (CSharp) Method

RemoveAllBufferedMessages() public static method

Remove ALL buffered messages of the local player (RPC's and Instantiation calls) Note that this only removed the buffered messages on the server, you will still need to remove the Instantiated GameObjects yourself.
public static RemoveAllBufferedMessages ( ) : void
return void
    public static void RemoveAllBufferedMessages()
    {
        if (!VerifyCanUseNetwork())
        {
            return;
        }

        RemoveAllBufferedMessages(player);
    }

Same methods

PhotonNetwork::RemoveAllBufferedMessages ( PhotonPlayer targetPlayer ) : void

Usage Example

Ejemplo n.º 1
0
 void LeaveRoom()
 {
     if (PhotonNetwork.connected)
     {
         PhotonNetwork.RemoveAllBufferedMessages();
         PhotonNetwork.RemoveRPCs();
         cm.enabled          = true;
         cm.connectingToRoom = true;
         cm.fadeDir          = -1;
         PhotonNetwork.LeaveRoom();
         this.enabled = false;
         transform.GetChild(0).gameObject.active = true;
         isPaused = false;
         Player   = null;
     }
 }