PhotonNetwork.RemoveAllBufferedMessages C# (CSharp) Метод

RemoveAllBufferedMessages() публичный статический Метод

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
Результат void
    public static void RemoveAllBufferedMessages()
    {
        if (!VerifyCanUseNetwork())
        {
            return;
        }

        RemoveAllBufferedMessages(player);
    }

Same methods

PhotonNetwork::RemoveAllBufferedMessages ( PhotonPlayer targetPlayer ) : void

Usage Example

Пример #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;
     }
 }