Пример #1
0
 public TextureCache Init(Texture2D texture2D)
 {
     if (jpg)
     {
         Bytes = texture2D.EncodeToJPG();
     }
     else
     {
         Bytes = texture2D.EncodeToPNG();
     }
     Config        = new TextureCacheConfig();
     Config.Format = texture2D.format;
     Config.Width  = texture2D.width;
     Config.Height = texture2D.height;
     return(this);
 }
Пример #2
0
 public TextureCache Init(TextureCacheConfig config, byte[] bytes)
 {
     Bytes  = bytes;
     Config = config;
     return(this);
 }