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); }
public TextureCache Init(TextureCacheConfig config, byte[] bytes) { Bytes = bytes; Config = config; return(this); }