예제 #1
0
 public static byte[] WriteToByteArray(this AssetTypeInstance instance)
 {
     byte[] data;
     using (MemoryStream ms = new MemoryStream())
         using (AssetsFileWriter w = new AssetsFileWriter(ms))
         {
             instance.Write(w);
             data = ms.ToArray();
         }
     return(data);
 }