예제 #1
0
 public void Serialize(BufferWriter writer, UnmanagedArray <T> instance, SerializationContext context)
 {
     writer.Write(instance.length);
     if (instance.Length > 0)
     {
         writer.Write((void *)instance.data, instance.length);
     }
 }
예제 #2
0
 public void Serialize(BufferWriter writer, UnmanagedBuffer instance, SerializationContext context)
 {
     unsafe
     {
         writer.Write(instance.Size);
         writer.Write(instance.Data.ToPointer(), instance.Size);
     }
 }