Serialize() public méthode

public Serialize ( NetworkWriter writer ) : void
writer UnityEngine.Networking.NetworkWriter
Résultat void
 private void GenerateError(int error)
 {
     NetworkMessageDelegate networkMessageDelegate = this.m_MessageHandlers.GetHandler((short) 34) ?? this.m_MessageHandlers.GetHandler((short) 34);
       if (networkMessageDelegate == null)
     return;
       ErrorMessage errorMessage = new ErrorMessage();
       errorMessage.errorCode = error;
       byte[] buffer = new byte[200];
       NetworkWriter writer = new NetworkWriter(buffer);
       errorMessage.Serialize(writer);
       NetworkReader networkReader = new NetworkReader(buffer);
       networkMessageDelegate(new NetworkMessage()
       {
     msgType = (short) 34,
     reader = networkReader,
     conn = this.m_Connection,
     channelId = 0
       });
 }
 private void GenerateError(NetworkConnection conn, int error)
 {
     if (this.m_MessageHandlers.GetHandler((short) 34) == null)
     return;
       ErrorMessage errorMessage = new ErrorMessage();
       errorMessage.errorCode = error;
       NetworkWriter writer = new NetworkWriter();
       errorMessage.Serialize(writer);
       NetworkReader reader = new NetworkReader(writer);
       this.m_MessageHandlers.InvokeHandler((short) 34, conn, reader, 0);
 }
 private void GenerateError(NetworkConnection conn, int error)
 {
     if (handlers.ContainsKey(0x22))
     {
         ErrorMessage message = new ErrorMessage {
             errorCode = error
         };
         NetworkWriter writer = new NetworkWriter();
         message.Serialize(writer);
         NetworkReader reader = new NetworkReader(writer);
         conn.InvokeHandler(0x22, reader, 0);
     }
 }